This article contains a reference of all namespaces, classes, modules and methods that are available for creating transaction tests.
For quicker orientation, there is a comprehensive collection of script examples provided by the transaction scripting examples repository in the ThousandEyes GitHub account.
ThousandEyes provides a wrapper of the Selenium WebDriver library for JavaScript. It contains methods for controlling the browser that is used to execute the test.
​ | ​ |
Namespace |
|
Module |
|
Import Syntax |
|
Used Like |
|
Supported methods |
|
​ |
|
​ |
|
​ |
|
​ |
|
​ |
|
​ |
|
​ |
|
​ |
|
​ |
|
​ |
|
​ |
|
​ |
|
​ |
|
​ |
|
​ |
|
​ |
|
Reference |
A set of methods for interacting with elements. Once the element is located and retrieved (by using the findElement()
function or similar), it can be managed using the following methods.
​ | ​ |
Namespace |
|
Module |
|
Find an element |
|
Supported methods |
|
​ |
|
​ |
|
​ |
|
​ |
|
​ |
|
​ |
|
​ |
|
Reference |
Defines common conditions for use with WebDriver wait.
​ | ​ |
Namespace |
|
Module |
|
Import Syntax |
|
Used Like |
|
Supported methods |
|
​ |
|
​ |
|
​ |
|
​ |
|
​ |
|
​ |
|
​ |
|
​ |
|
​ |
|
​ |
|
​ |
|
​ |
|
​ |
|
​ |
|
​ |
|
​ |
|
​ |
|
​ |
|
​ |
|
​ |
|
​ |
|
​ |
|
​ |
|
​ |
|
​ |
|
​ |
|
​ |
|
​ |
|
Reference | ​https://selenium.dev/selenium/docs/api/javascript/module/selenium-webdriver/lib/until.html​ |
Representations of pressable keys that aren't text.
​ | ​ |
Namespace |
|
Module |
|
Import Syntax |
|
Used Like |
|
Supported methods |
|
Values | See the reference below |
Reference | ​https://selenium.dev/selenium/docs/api/javascript/module/selenium-webdriver/index_exports_Key.html​ |
​ | ​ |
Namespace |
|
Module |
|
Method |
|
Used Like |
|
Description | Takes a screenshot of the current page and stores it in memory. These screenshots will be collected at the end of the test. A maximum of 3 screenshots are allowed, new screenshots will override the old ones in case that this limit is exceeded. |
Parameters | None |
Returns | None |
​ | ​ |
Namespace |
|
Module |
|
Import Syntax |
|
Used Like |
|
Method |
|
Description | Gets the stored credential value matching the supplied name. Only works if you have already associated the credential with the current test (Test settings page). |
Parameters |
|
Returns | (string) The password or sensitive value associated with the supplied credential name |
​ | ​ |
Namespace |
|
Module |
|
Import Syntax |
|
Used Like |
|
Method |
|
Description | Waits for a download matching the supplied filename to appear and then to finish. If a file matching the supplied name has previously been downloaded, this function will complete immediately. If no file matching the supplied name has been or is currently downloading, it will wait for the supplied timeout amount of time for the file to appear and finish downloading. |
Parameters |
|
​ |
|
ThousandEyes transactions support two types of measuring time:
Markers
Overall transaction time
Markers are custom time delimiters, enabling precise time measurements of smaller sections of the transaction. A maximum of 200 markers can be defined in a transaction script. The Waterfall tab displays the first ten markers, with a Show more link if more than ten markers are defined.
Start a marker:
​ | ​ |
Namespace |
|
Module |
|
Method |
|
Description | Starts a marker with the supplied name. This marker can later be stopped by calling the |
Parameters |
|
Returns | None. Will throw an error if attempting to start a previously started marker. |
Stop a marker:
​ | ​ |
Namespace |
|
Module |
|
Method |
|
Description | Stops the marker matching the supplied name. |
Parameters |
|
Returns | None. Will throw an error if attempting to stop a marker that hasn't been started yet or one that was already stopped. |
Set a marker:
​ | ​ |
Namespace |
|
Module |
|
Method |
|
Description | Creates a marker that spans from transaction start time to the time this method is called. Calling |
Parameters |
|
Returns | None. |
Running a transaction test implicitly causes the overall transaction time measurement, spanning from the moment the transaction test run starts and to the end of the transaction. However, if customization of overall transaction time's start and stop moments is required, the following methods can be used to such effect. |
Set the overall transaction time start moment:
​ | ​ |
Namespace |
|
Module |
|
Method |
|
Description | Sets the start time of the transaction. If not called, the transaction start time will default to the script start time. |
Parameters | None |
Returns | None |
Set the overall transaction time end moment:
​ | ​ |
Namespace |
|
Module |
|
Method |
|
Description | Sets the end time of the transaction. If not called, the transaction start time will default to the script end time. |
Parameters | None |
Returns | None |
Provided is a set of mechanisms dedicated to locating elements on the page.
​ | ​ |
Namespace |
|
Class |
|
Import Syntax |
|
Used Like |
|
Supported static methods |
|
​ |
|
​ |
|
​ |
|
​ |
|
​ |
|
​ |
|
​ |
|
Reference | ​https://selenium.dev/selenium/docs/api/javascript/module/selenium-webdriver/lib/by_exports_By.html​ |
The assert
module provides a set of assertion functions for verifying invariants.
NOTE: Only strict mode is supported.
​ | ​ |
Namespace |
|
Module |
|
Import Syntax |
|
Used Like |
|
Supported methods |
|
​ |
|
​ |
|
​ |
|
​ |
|
​ |
|
​ |
|
​ |
|
​ |
|
​ |
|
​ |
|
​ |
|
Reference |
For further information about transaction testing, see the Transaction Scripting Guide.
If you have any questions, contact the ThousandEyes Customer Engineering team.