HTML Modules
The folder Engines->Html in the Standard subset contains Modules that perform specific tasks for the XBrowser Engine 3.0.
The Html folder also contains sub-folders with additional Modules:
Check Webpage Accessibility
The Module Check Webpage Accessibility allows you to test how user-accessible your webpage is. To learn how to use it, check out Web accessibility testing.
The Module has the following ModuleAttributes:
ModuleAttribute |
Description |
---|---|
Title |
Caption of the browser window that you want to steer. You can also add a wildcard *. If you want the XBrowser Engine 3.0 to use the only open tab in your browser window, enter *. |
Url |
URL of the page you want to steer. For example, http://support.tricentis.com. |
Window Index |
Index of the browser window you want to steer, if multiple windows match the previous criteria. Specify one of these values:
|
![]() |
You need to specify at least one of the Search Criteria: Title, Url, or Window Index. |
![]() |
In this example, the XBrowser Engine 3.0 searches for the open browser window that has a Title starting with Tricentis, https://support-hub.tricentis.com/ as the URL, and a Window Index of 2. Once it finds the correct browser window, the XBrowser Engine 3.0 runs an accessibility analysis on it.
Example - Web accessibility test based on the ModuleAttributes of the Module Check Webpage Acessibility |
Execute JavaScript
The Module Execute JavaScript allows you to execute JavaScript calls on web pages.
It has the following ModuleAttributes:
ModuleAttribute |
Description |
---|---|
Title |
Caption of the browser window that you want to steer. Specify an * value to match any title. For example, if you want XBrowser Engine 3.0 to find and use the only tab open in your browser window, enter *. |
Url |
URL of the browser window you want to steer. For example, http://support.tricentis.com. |
Window Index |
Index of the browser window you want to steer, in case multiple browser windows match the previous criteria. Specify one of these values:
|
JavaScript |
Return statement that you want to execute. If the string contains double quotation marks ", you must escape the string with two additional sets of quotation marks. For example: window.location.href="""http://support.tricentis.com""" |
![]() |
You need to specify at least one of the Search Criteria: Title, Url, or Window Index. |
![]() |
In this example, the XBrowser Engine 3.0 searches for the open browser window that has a Title starting with Tricentis, https://support-hub.tricentis.com/ as the URL, and a Window Index of 2. Once it finds the correct browser window, it redirects it to https://support-hub.tricentis.com/open.
Example - Execute JavaScript |
Verify JavaScript Result
The Module Verify JavaScript Result allows you to verify the result of a JavaScript call. For example, you can retrieve and verify the values of browser cookies and JavaScript variables.
It has the following ModuleAttributes:
ModuleAttribute |
Description |
---|---|
Title |
Caption of the browser window that you want to steer. Specify an * value to match any title. For example, if you want XBrowser Engine 3.0 to find and use the only tab open in your browser window, enter *. |
Url |
URL of the browser window you want to steer. For example, http://support.tricentis.com. |
Window Index |
Index of the browser window you want to steer, in case multiple browser windows match the previous criteria. Specify one of these values:
|
JavaScript |
Type return and the JavaScript statement whose result you want to verify. If the string contains double quotation marks ", you must escape the string with two additional sets of quotation marks. For example: document.cookie |
Result |
The expected return value of the JavaScript call. |
![]() |
You need to specify at least one of the Search Criteria: Title, Url, or Window Index. |
![]() |
In this example, the XBrowser Engine 3.0 searches for the specific browser window that matches the following criteria:
Once found, it retrieves the cookies and verifies that the value returned is username-Jane Doe; language=en-US.
Example - Verify JavaScript result |
OpenUrl
The Module OpenUrl allows you to open websites in a browser.
It has the following ModuleAttributes:
ModuleAttribute |
Description |
---|---|
Url |
URL that you want to open. If you want to specify the browser, use the test configuration parameter Browser (see chapter "Specify the browser"). |
UseActiveTab |
Defines whether Tosca Commander looks for an open browser window to open a URL in the active tab of that window. When set to True, Tosca Commander behaves as follows:
When set to False or empty, Tosca Commander behaves as follows:
If you execute your TestCase via WebDriver, this setting has no effect. |
Ensures that the specified URL is open. Select one of these values:
False is the default value. Setting the value to True requires that the UseActiveTab value is set to True as well. Note that this function is not supported in Internet Explorer and the value should be set to False. |
|
Command-line arguments to start your browser. If you want to use multiple arguments, enter each argument into a separate TestStepValue. Note that arguments are different for each browser. |
![]() |
The XBrowser Engine 3.0 doesn't validate whether the URL you entered is accessible. Even if the URL is unreachable, the TestStep passes. |
![]() |
In this example, you open the URL https://support.tricentis.com in Chrome.
Open a website |
Open embedded Chrome/Chromium application
The Module Open embedded Chrome/Chromium application allows you to open applications that embed Chrome or Chromium with WebDriver.
For information on how to steer these applications, see chapter "Automate embedded Chrome or Chromium".
![]() |
The XBrowser Engine 3.0 only supports local execution via WebDriver. |
The Module has the following ModuleAttributes:
ModuleAttribute |
Description |
---|---|
Application Path |
Full path to the application that you want to steer, including file name and extension. |
Window Classname |
Class name of the main application window. This ModuleAttribute is optional. It speeds up the search for the application window. |
WebDriver Server Path |
Path to the chromedriver.exe that you want to use. This ModuleAttribute is optional. If you don't specify a path, the XBrowser Engine 3.0 uses the default server. |
Url |
URL that you want to display after the application is opened. This ModuleAttribute is optional. |
Arguments |
Read-only. You can't enter anything here. |
Arguments->Argument |
Argument that you want to transfer to the application. This ModuleAttribute is optional. |
![]() |
This example shows how to open an embedded Chromium application. The XBrowser Engine 3.0 below performs the following actions:
Open a Chromium application |
ClickOnScreen
The Module ClickOnScreen allows you to click onto a specified position in your browser tab (see chapter "Click on a browser screen position").
It has the following ModuleAttributes:
ModuleAttribute |
Description |
---|---|
Caption |
Caption of the tab in which you want to perform the click. |
X |
Specify the x-coordinate in percent. leftmost value is 0 and the rightmost value is 100. |
Y |
Specify y-coordinate in percent. The top value is 0 and the bottom value is 100. |
![]() |
In this example, the XBrowser Engine 3.0 performs the following actions:
Click on a certain screen position |
CloseBrowser
The Module CloseBrowser allows you to close tabs in your browser.
It has the following ModuleAttribute:
ModuleAttribute |
Description |
---|---|
Title |
Caption of the tab that you want to close. You can use wildcards. If you have the tab open in several browsers, but only want to close it in one of them, use test configuration parameter Browser (see chapter "Specify the browser"). If you use WebDriver, use test configuration parameter HubAddress to only close tabs opened for the specified WebDriver hub address. |
![]() |
This example shows how to close a browser tab. This browser tab has the caption Tricentis Vehicle Insurance. Instead of typing out the entire caption, you use a wildcard.
Close browser tab Since you only want to close the tab in Chrome, you create the test configuration parameter Browser with the value Chrome for your TestCase.
Specify in which browser you want to close the tab |
Connect to Chrome/Chromium application
The Module Connect to Chrome/Chromium application allows you to connect to applications that embed Chrome or Chromium with WebDriver.
For information on how to steer these applications, see chapter "Automate embedded Chrome or Chromium".
![]() |
The XBrowser Engine 3.0 only supports local execution via WebDriver. |
The Module has the following ModuleAttributes:
ModuleAttribute |
Description |
---|---|
Debug Port |
Debug port under which the application runs. |
WebDriver Server Path |
Path to the chromedriver.exe that you want to use. This ModuleAttribute is optional. If you don't specify a path, the XBrowser Engine 3.0 uses the default server. |
Window Classname |
Class name of the main application window. This ModuleAttribute is optional. It speeds up the search for the application window. |
![]() |
In this example, you connect to an embedded Chromium application. The XBrowser Engine 3.0 performs the following actions:
Connect to a Chrome/Chromium application |
Start HTML Log Monitoring
The Module Start HTML Log Monitoring allows you to start tracking either the console logs or the network logs. You can use this feature as you debug your application.
|
This Module only supports Google Chrome and Microsoft Edge browsers. To steer your application via XBrowser, both Modules Start HTML Log Monitoring and Stop HTML Log Monitoring must be in the same TestCase. |
The Module has the following attributes:
ModuleAttribute |
Description |
---|---|
Title |
Caption of the browser window that you want to steer. Specify an * value to match any title. For example, if you want XBrowser Engine 3.0 to find and use the only tab open in your browser window, enter *. |
Url |
URL of the browser window you want to steer. For example, http://support.tricentis.com. |
Window Index |
Index of the browser window you want to steer, in case multiple browser windows match the previous criteria. Specify one of these values:
|
Log Type |
Type of log monitoring to perform on the page you want to steer. Specify one of these values:
|
![]() |
You need to specify at least one of the Search Criteria: Title, Url, or Window Index. |
Additionally, for executions over a Selenium Grid server version older than 4.8.2, you need to start the browser with an additional argument: --remote-allow-origins=*.
![]() |
In this example, the XBrowser Engine 3.0 searches for the specific browser window that matches the following criteria:
Once found, it starts its Console log monitoring.
Example - Start HTML Log Monitoring |
Stop HTML Log Monitoring
The Module Stop HTML Log Monitoring allows you to stop tracking either the console logs or the network logs you previously started and retrieve the monitoring data. You can use this feature as you debug your application.
|
This Module only supports Google Chrome and Microsoft Edge browsers. To steer your application via XBrowser, both Modules Start HTML Log Monitoring and Stop HTML Log Monitoring must be in the same TestCase. |
The Module has the following attributes:
ModuleAttribute |
Description |
---|---|
Title |
Caption of the browser window that you want to steer. Specify an * value to match any title. For example, if you want XBrowser Engine 3.0 to find and use the only tab open in your browser window, enter *. |
Url |
URL of the browser window you want to steer. For example, http://support.tricentis.com. |
Window Index |
Index of the browser window you want to steer, in case multiple browser windows match the previous criteria. Specify one of these values:
|
Log Type |
Type of log monitoring to perform on the page you want to steer. Specify one of these values:
|
Log File Path |
Location where you want to save report files with the log entries that occurred between the start and the stop tasks. This ModuleAttribute generates different log files based on the Log Type:
Specify the folder path. |
![]() |
You need to specify at least one of the Search Criteria: Title, Url, or Window Index. |
Additionally, for executions over a Selenium Grid server version older than 4.8.2, you need to start the browser with an additional argument: --remote-allow-origins=*.
![]() |
In this example, the XBrowser Engine 3.0 searches for the specific browser window that matches the following criteria:
Once found, it stops its Console log monitoring and saves the report log file in %TEMP%\NetworkLog.txt.
Example - Stop HTML Log Monitoring |
Steer Dialog Box
The Module Steer Dialog Box allows you to steer JavaScript dialog boxes in your application, which increases your testing accuracy. To learn how to use this Module, check out the Steer JavaScript dialog boxes.
|
You can only use this Module via XBrowser with either Google Chrome or Microsoft Edge browsers. |
The Module has the following ModuleAttributes:
ModuleAttribute |
Description |
---|---|
Title |
Caption of the browser window that you want to steer. Specify an * value to match any title. For example, if you want XBrowser Engine 3.0 to find and use the only tab open in your browser window, enter *. |
Url |
URL of the browser window you want to steer. For example, http://support.tricentis.com. |
Window Index |
Index of the browser window you want to steer, in case multiple browser windows match the previous criteria. Specify one of these values:
|
Confirmation |
Response you want to send to a confirmation dialog. Specify one of these values:
|
PromptText |
Text you want to enter in the text input field of a prompt dialog. Note that this ModuleAttribute only works with ActionMode Input. |
![]() |
You need to specify at least one of the Search Criteria: Title, Url, or Window Index. |
![]() |
In this example, the XBrowser Engine 3.0 searches for the specific browser window that matches the following criteria:
Once XBrowser Engine 3.0 finds the browser window, it enters the text Tricentis Tosca in the text input field of the prompt dialog and selects OK.
Example - Steer Dialog Box |
Check Webpage for Broken Links
The Module Check Webpage for Broken Links lets you check for any links that return client error responses (400-499) or server error responses (500-599). This helps you verify whether there are broken links inside a webpage, for instance.
Note that Tricentis Tosca needs to work with an existing browser session to verify for error responses. This means that the web page containing the links you want to verify must be open at the time of the verification.
The Module has the following ModuleAttributes:
ModuleAttribute |
Description |
---|---|
Title* |
Identifies the webpage containing the links you want to verify using the page's HTML title. Specify an asterisk (*) to match any title. For example, if you want XBrowser Engine 3.0 to find and use the only tab open in your browser window, enter *. |
URL* |
Identifies the webpage containing the links you want to verify using the URL of the page you currently have open. For example, http://support.tricentis.com. |
Window Index* |
Identifies the webpage containing the links you want to verify using the index of the browser window you want to steer. Specify one of these values:
|
Ignore Errors |
If you'd like to ignore specific response errors from this verification, specify the error code in this ModuleAttribute. For instance, if you'd like to ignore 403 ("Forbidden") responses, enter 403. In this case, Tricentis Tosca ignores any 403 response errors during the verification. |
*It's mandatory that you specify at least one of these identification parameters so that Tricentis Tosca can find the correct browser window. If you have multiple browser windows with the same (or very similar) identification values, you can use additional identification ModuleAttributes to precisely find the intended browser window. |
![]() |
This example TestCase investigates the page at http://myapplication.tricentis.com for broken links. It checks for all error types except 403 errors.
Example - Checking for error responses Once it finds the window, it verifies all links within this web page for error responses:
Link verification example in Tricentis Tosca |
Read Web QR/Barcode
The Module Read Web QR/Barcode lets you verify or buffer QR codes or barcodes in a browser.
Note that when you run your test, the web page containing the QR codes or barcodes you want to read must be open.
The Module Read Web QR/Barcode has the following ModuleAttributes:
ModuleAttribute |
Description |
---|---|
Title* |
Enter the HTML title of the webpage containing the QR codes or barcodes you want to verify or buffer. You can use wildcards. For example, to use the only open tab in your browser window, enter *. |
URL* |
Enter the URL of the currently open webpage containing the QR codes or barcodes you want to verify or buffer. |
Window Index* |
Enter the index of the browser window containing the QR codes or barcodes you want to verify or buffer. You can use any of these values:
|
Type |
Select the kind of code you want to verify or buffer. You can use any of these values:
|
Index |
Enter the index position of the QR codes or barcode you want to verify or buffer. For example, enter 5 to specify the fifth QR code on the page. To verify or buffer all QR codes and barcodes on a page, leave Index blank. |
Value |
To verify QR codes or barcodes, enter the expected values to verify. Then select ActionMode Verify. To buffer QR codes or barcodes, enter a name for your new buffer. Then select ActionMode Buffer. |
* You need to specify at least one of these values in your TestCase so that Tosca can find the correct browser window. If you have multiple browser windows with the same or very similar identifiers, use more than one of these values in your TestCase. |
![]() |
This example TestCase verifies the first QR code at https://www.example.com/signup. It reads the QR code and verifies that it contains the value https://www.example.com/download.
Verify a web QR code |