BROWSER
OS
SCREEN_RESOLUTION
BROWSER_VERSION
Syntax | Return Type | Description |
$BROWSER | STRING | Variable holds details of the browser in which the test case is running. |
$OS | STRING | Variable holds details of the OS in which the test case is running. |
$SCREEN_RESOLUTION | STRING | Variable holds the screen resolution of the browser in which the test case is running. |
$BROWSER_VERSION | STRING | Variable holds the details of the version number of the browser in which the test case is running. |
Example
DEVICE
Syntax | Return Type | Description |
$OS_VERSION | STRING | Variable holds the details of the OS version of the device on which the test case is running. |
$DEVICE | STRING | Variable holds the details of the device on which the test case is running. |
Example

Note: The returned values shown in the example can vary according to the OS versions and screen devices used.
TESTCASE_ID
IS_PREVIEW_RUN
NOW
Syntax | Return Type | Description |
$TODAY | STRING | Variable holds the current date of the machine or device on which the test case is running. |
$TESTCASE_ID | STRING | A unique ID is generated for every test case upon its creation, and this ID is found in the URL of the corresponding test case. This variable is what holds the unique test case ID for the currently running test case. |
$IS_PREVIEW_RUN | BOOLEAN | Variable validates whether the test case is running in preview or not. |
$NOW | STRING | Variable holds the current date and time. |
info($TODAY); // Logs shows the returned value of the variable as: Info - 16/10/2023
info($TESTCASE_ID); // Logs shows the returned value of the variable as: Info - 1090000000722519
info($IS_PREVIEW_RUN); // Logs shows the returned value of the variable as: Info - true
Note: The returned values shown in the example can vary according to the real-time data available.