Check URL
Function: CHECK_URL
The CHECK_URL function is used to check the availability and accessibility of a specified URL from the test device. This function is essential for testing internet connectivity and the ability to access web resources.
Mobile data is switched on first. The URL is opened in the device browser, and the step compares the domain of the page that loaded (not the full URL) with the expected one. If SEARCH_VALUE is set, the page content must also contain it.
Supported on: Android, iOS and MCM. On MCM the URL is fetched over AT commands, so the check is a reachability test and SEARCH_VALUE is not offered.
Parameters¶
| Parameter Name | Description | Example Values | Required | Default Value |
|---|---|---|---|---|
| URL | The URL to be checked for availability. | http://example.com | Yes | |
| TIMEOUT | The maximum time to wait for the URL check before considering it a failure. Whole seconds, 0-3700. | Recommended 30 - 60 | Yes | |
| CLEAR_CACHE | Whether to clear the browser cache before performing the URL check. | OFF, ON |
No | OFF |
| FOLLOW_REDIRECTS | TRUE: the page may redirect, and the domain it lands on is compared with FINAL_URL. FALSE: the domain is compared with URL. |
TRUE, FALSE |
Yes | TRUE |
| FINAL_URL | The URL the page is expected to redirect to. Only used (and only shown) when FOLLOW_REDIRECTS is TRUE; if it is empty, URL is used instead. With a FINAL_URL, the step keeps checking until the browser lands on that domain or TIMEOUT runs out. |
https://www.example.com/home | No | |
| SEARCH_VALUE | A value to search for in the response to confirm successful access. | Welcome, Hello | No | |
| EXPECT | The expected result of the URL check attempt. It defines what constitutes a successful URL check. | SUCCESS, FAIL |
Yes | SUCCESS |