Test remote browsers
Tosca Cloud allows you to test web applications on remote machines and cloud environments. You can create test cases to run on remote browsers and playlists that run remotely from start to finish, or switch between remote and local tests.
Run tests on a remote machine
To test a browser on a remote machine, you must design a test case that steers web application controls. You need to use the OpenUrl module to open the website you want to test and we recommend that you use CloseBrowser module to close your browser or tab at the end of your test.
There are a few exceptions to the controls you can steer remotely, such as:
-
Offset parameters OffsetHorizontal and OffsetVertical only work with the click operation CLICK.
-
Keyboard entry simulations KeyDown and KeyUp only support the keys SHIFT, ALT, and CONTROL. Use SendKeys for all other keyboard commands.
-
Keyboard commands are not supported for Safari.
-
Standard modules that run operations on your local machine.
You must also set test case parameters in your test case or playlist. Different parameter configurations are necessary depending on the technology you use for your remote machines.

To run a test case on BrowserStack, set up the following test case parameters:
Parameter |
Value |
Optional |
---|---|---|
BrowserStack |
No |
|
The browser you want to use for this test case. The default value is Chrome. Possible values: InternetExplorer, Firefox, Chrome, Edge. |
No |
|
Version of the browser. |
Yes |
|
Operating system on which you want to run the test case. |
Yes |
|
Specify the cloud provider specific capabilities you want to use. Name syntax:
For example: WebDriverJson_bstack___options for BrowserStack's bstack:options tag. The value of this parameter must be a JSON string that can contain multiple capabilities and uses the following syntax:
For example: "{""userName"": ""<UserName>"", ""accessKey"": ""<accessKey>"", ""browserVersion"": ""136"", os"": ""OS X"", ""osVersion"": ""Monterey"", ""acceptInsecureCerts"": true, ""timeouts"": {""implicit"": 10000, ""pageLoad"": 30000}}" For information on their options tag, capability names, and capabilities' specific values, check out your cloud provider documentation. |
Yes |
|
Specify the BrowserStack capability you want to use. Name syntax:
For example: BrowserStack_Example__name___1 for the Example.name:1 capability. For information on BrowserStack capabilities and their values, check out the BrowserStack documentation (opens in new tab). |
Yes |
You can choose to use test case parameter WebDriverJson_<ProviderOptionsTag> or Browserstack_<CapabilityName> to define your BrowserStack capabilities. We recommend to use parameter WebDriverJson_<ProviderOptionsTag> as it is a lot more versatile than Browserstack_<CapabilityName>.

To run a test case via WebDriver, set up the following test case parameters:
Parameter |
Value |
Optional |
---|---|---|
The IP address of the grid hub where you want to run the test case. For example: localhost for running tests on your local machine, http://<hubaddress>/wd/hub for remote hubs. Open the URL http://<IP:portnumber>/grid/console to check out information on the connection nodes. |
No |
|
The browser you want to use for this test case. Possible values: InternetExplorer, Firefox, Chrome, Edge |
No |
|
Version of the browser |
Yes |
|
Operating system on which you want to run the test case |
Yes |
|
IP address of the proxy server on which you want to run the test case. Use it with WebDriverProxyUsername and WebDriverProxyPassword. |
Yes |
|
User name to authenticate with the proxy server. Use it with WebDriverHubProxyAddress and WebDriverProxyPassword. |
Yes |
|
Password to authenticate with the proxy server. Use it with WebDriverProxyUsername and WebDriverHubProxyAddress. |
Yes |
|
Improve test run time by setting its value to True. |
Yes |
|
Applies browser-specific user profile preferences to WebDriver remote tests for Chrome, Edge, or Firefox. Name syntax:
For example: WebDriverUserProfilePreference_Preference__name___1 for the preference Preference.name:1. Check out your web browser documentation for information on preferences and their values. |
Yes |
|
Specify the WebDriver capability you want to use. Name syntax:
For example: WebDriver_Example__name___1 for the Example.name:1 capability. For information on WebDriver capabilities and their values, check out the WebDriver documentation (opens in new tab) or the BrowserStack documentation (opens in new tab). |
Yes |
|
Specify the cloud provider specific capabilities you want to use. Name syntax:
For example: WebDriverJson_bstack___options for BrowserStack's bstack:options tag. The value of this parameter must be a JSON string that can contain multiple capabilities and uses the following syntax:
For example: "{""userName"": ""<UserName>"", ""accessKey"": ""<accessKey>"", ""browserVersion"": ""136"", os"": ""OS X"", ""osVersion"": ""Monterey"", ""acceptInsecureCerts"": true, ""timeouts"": {""implicit"": 10000, ""pageLoad"": 30000}}" For information on their options tag, capability names, and capabilities' specific values, check out your cloud provider documentation. |
Yes |
You can choose to use test case parameter WebDriverJson_<ProviderOptionsTag> or WebDriver_<CapabilityName> to define your WebDriver capabilities. We recommend to use parameter WebDriverJson_<ProviderOptionsTag> as it is a lot more versatile than WebDriver_<CapabilityName>.

After you set up a test or playlist to run on BrowserStack or via WebDriver, you can switch to running on XBrowser. The switch method is different whether you set up your remote testing parameters in a test case or on a playlist level:
-
To switch a test case before a new test run, remove the HubAddress test case parameter. This deactivates the hub connections and activates the default run type, which is XBrowser.
-
To switch during a playlist run, set the HubAddress test case parameter to WebDriver execution off in every test case in your playlist that you want to run on XBrowser. This is especially useful when working with SAP controls.

You can run your test case in a headless Chrome, Chromium, or Firefox browser instance via WebDriver. The procedure changes if you run your test in a new browser instance or an already running one.
Run a test in a new headless Chrome, Chromium, or Firefox browser instance
To run in a new headless Chrome, Chromium, or Firefox browser instance, follow these steps:
-
Set up a test via WebDriver.
-
Use the OpenUrl module to open your website. In the BrowserArguments > Argument module parameter, specify the following:
-
The argument that starts the browser in headless mode, such as: --headless
-
The argument that specifies a suitable window size, such as: --window-size=1024x640
-
Run a test in an already running headless Chrome browser instance
To run in an already running headless Chrome browser instance, follow these steps:
-
Set up a test via WebDriver.
-
Connect to the already running headless Chrome browser instance with the module Connect to Chrome/Chromium application. In the Debug Port module parameter, specify the debug port under which the application runs.
You cannot run your test in an already running headless Firefox browser instance.