Steer remote browser

You can create XBrowser WebDriver Modules with XScan.

To do so, right-click on a Module folder or use the dynamic menu Modules in Tosca Commander and select Scan->More->Web Driver. For further details on how to proceed, please see chapter "Scan via WebDriver".

You can steer XBrowser WebDriver controls as described in chapter "Steer XBrowser controls", however there are some restrictions. To view a list of restrictions, see this Tricentis Knowledge Base article.

Execute TestCases on a remote machine

To execute an XBrowser TestCase on a remote machine, you have to set test configuration parameters on the level of the TestCase. Depending whether you want to execute a TestCase via WebDriver or on BrowserStack, different configurations are necessary.

Before you can execute a TestCase on a remote machine, you have to open the website in your browser first.

You can only use TBox Standard Modules which are machine independent (e.g. TBox Wait, TBox Set Buffer) in a remote execution. Machine dependent Standard Modules (e.g. TBox Start Program) are executed on the local machine.

Execute TestCases on BrowserStack

To execute an XBrowser TestCase on BrowserStack you have to create test configuration parameters on the level of the TestCase you want to execute.

To execute an XBrowser TestCase on BrowserStack, follow the steps below:

  1. Create the test configuration parameters Browser, BrowserVersion, HubAddress and OperatingSystem on the level of the TestCase you want to execute.

  2. In the Value column of the test configuration parameters, enter the according information:

    • HubAddress: enter BrowserStack to execute your TestCase on BrowserStack.

    • Browser: enter the browser on which you want to execute the TestCase.

    • BrowserVersion: enter the version of the browser on which you want to execute the TestCase.

      If you use the WebDriver capability version instead of browserVersion, use the TCP WebDriver_version instead of BrowserVersion.

    • OperatingSystem: enter the operating system on which you want to execute the TestCase.

      If you use the WebDriver capability platform instead of platformName, use the TCP WebDriver_platform instead of OperatingSystem.

Specifying test configuration parameters for execution on BrowserStack

Tricentis recommends to close the browser after executing your TestCase on BrowserStack.

For further details on how to continue with the execution of a TestCase, refer to chapter "Run ExecutionLists".

Ensure that you specified the Access Key and the Username of the BrowserStack account and the Hub Address, which should be used for BrowserStack in the Settings dialog.

Execute TestCases via WebDriver

To execute an XBrowser TestCase via WebDriver, follow the steps below:

  1. Create the test configuration parameter HubAddress on the level of the TestCase you want to execute.

  2. In the Value column of the test configuration parameter HubAddress, enter the IP address of the grid hub where you want to execute the TestCase. For example, if the grid hub is on your local machine, enter localhost. For more information about the connected nodes, open the URL http://<IP:portnumber>/grid/console in your browser.

  3. Optionally, create the following test configuration parameters to further specify your test configuration:

    • Browser: enter the browser on which you want to execute the TestCase.

    • BrowserVersion: enter the version of the browser on which you want to execute the TestCase.

    • OperatingSystem: enter the operating system on which you want to execute the TestCase.

  4. Optionally, if you want to use a proxy server, create the following test configuration parameters:

    • WebDriverHubProxyAddress: enter the IP address of the proxy server on which you want to execute the TestCase.

    • WebDriverProxyUsername: enter the user name to authenticate with the proxy server.

    • WebDriverProxyPassword: enter the password to authenticate with the proxy server.

    Note that you can only use these TCPs with the Module OpenUrl.

  5. Optionally, if you encounter slow execution time, you can create the test configuration parameter Fibermode and set the Value to True to improve the execution time.

Specifying test configuration parameters for execution on WebDriver

For further details on how to continue with the execution of a TestCase, refer to chapter "Run ExecutionLists".

Use WebDriver capabilities

You can use WebDriver capabilities to specify your test configuration. For the list of WebDriver capabilities, see the WebDriver documentation and the BrowserStack documentation.

XBrowser Engine 3.0 only supports WebDriver capabilities which take a string or a list of strings as their value.

To use a WebDriver capability, follow the steps below:

  1. Create a test configuration parameter in your TestCase.

  2. Name the test configuration parameter Webdriver_<capability>. Replace <capability> with the name of the capability. If the name of the capability contains a dot (.), replace this character with double underscore (__). If the name of the capability contains a colon (:), replace this character with triple underscore (___).

  3. Define the value of the capability. To specify a list of strings, separate the strings with semicolons (;).

Specify a WebDriver capability

Execute TestCases in headless browser

You can execute your TestCase in a headless Chrome, Chromium, or Firefox browser instance via WebDriver. The procedure depends on how you want to start the execution:

You cannot execute in an already running headless Firefox browser instance.

Execute in a new headless Chrome, Chromium, or Firefox browser instance

To execute in a new headless Chrome, Chromium, or Firefox browser instance, follow the steps below:

  1. Set up execution via WebDriver.

  2. Open a website with the Module OpenUrl. In the WebDriverBrowserArguments->Argument ModuleAttribute, specify the following:

    • the argument that starts the browser in headless mode, e.g. --headless

    • the argument that specifies a suitable window size, e.g. --window-size=1024x640

Execute in an already running headless Chrome browser instance

To execute in an already running headless Chrome browser instance, follow the steps below:

  1. Set up execution via WebDriver.

  2. Connect to the already running headless Chrome browser instance with the Module Connect to Chrome/Chromium application. In the Debug Port ModuleAttribute, specify the debug port under which the application runs.

Open a website

To open a website on a remote machine, use the Module OpenUrl.

For further details on how to open a website, refer to see chapter "Open website".

Close a browser

To close a website on a remote machine, use the Module CloseBrowser.

For further details on how to close a website, refer to see chapter "Close browser".