HTML modules

The technology-specific modules for HTML perform specific browser automation tasks.

Check Webpage Accessibility

Tests how user-accessible your webpage is. You need to specify at least one of the search criteria: Title, Url, or Window Index.

Value

Description

Title

Caption of the browser window you want to steer.

You can also add a wildcard *. If you want 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:

  • <integer>: this index refers to the chronological order of window opening, not their visual order.

  • last: this value refers to the last window you opened.

Execute JavaScript

Executes JavaScript calls on web pages. You need to specify at least one of the search criteria: Title, Url, or Window Index.

Value

Description

Title

Caption of the browser window you want to steer.

You can also add a wildcard *. If you want 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:

  • <integer>: this index refers to the chronological order of window opening, not their visual order.

  • last: this value refers to the last window you opened.

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: window.location.href="""http://support.tricentis.com"""

Result

Expected return value of the JavaScript call.

Verify JavaScript Result

Verifies the result of a JavaScript call. For example, you can retrieve and verify the values of browser cookies and JavaScript variables. You need to specify at least one of the search criteria: Title, Url, or Window Index.

Value

Description

Title

Caption of the browser window you want to steer.

You can also add a wildcard *. If you want 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.

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"""

OpenUrl

Opens websites in a browser.

Value

Description

Url

URL you want to open.

UseActiveTab

If set to True, Tosca Cloud looks for an open browser window when it runs the test step based on this module. If it finds an open browser, it opens the URL in the active tab of this browser. If Tosca Cloud can't find an open browser, it opens the URL in a new browser window.

If set to False or empty, Tosca Cloud opens the URL in a new browser window only if no other windows are already open. If there is an open window, Tosca Cloud reuses that window.

ForcePageSwitch

If set to True Tosca Cloud, repeats the action of this module until the URL is open. This requires that the value UseActiveTab is set to True, too.

If set to False or empty, Tosca Cloud attempts to open the specified URL once.

Note that this value is not supported in Internet Explorer and it should be set to False.

BrowserArguments->Argument

Command-line arguments to start your browser. If you want to use multiple arguments, enter each argument into a separate test step value.

Note that arguments are different for each browser.

Open embedded Chrome/Chromium application

Opens applications that embed Chrome or Chromium with WebDriver.

Value

Description

Application Path

Full path of the application you want to steer, including file name and extension.

Window Classname

Class name of the main application window.

This value 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 value is optional.

Url

URL you want to display after the application is opened. This value is optional.

Arguments

Read-only. You can't enter anything here.

Arguments->Argument

Argument you want to transfer to the application. This value is optional.

ClickOnScreen

You can use this module to perform the following actions:

  • A click onto the specified position in a web browser.

  • A click onto the specified position in the mobile browsers Chrome on Android and Safari on iOS. If you use this module for mobile browsers, Tosca Cloud closes the virtual keyboard.

  • A tap onto the specified position in a mobile device screen.

Value

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.

CloseBrowser

Closes tabs in your browser.

Value

Description

Title

Caption of the tab you want to close. You can use wildcards.

Connect to Chrome/Chromium application

Connects to applications that embed Chrome or Chromium with WebDriver.

Value

Description

Debug Port

Debug port under which the application runs.

WebDriver Server Path

Path to the chromedriver.exe that you want to use. This value is optional.

Window Classname

Class name of the main application window. This value is optional. It speeds up the search for the application window.

Start HTML Log Monitoring

Starts 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. You need to specify at least one of the search criteria: Title, Url, or Window Index.

Value

Description

Title

Caption of the browser window you want to steer.

You can also add a wildcard *. If you want 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, in case multiple browser windows match the previous criteria.

Specify one of these values:

  • <integer>: this index only refers to the opening time of the windows, not their visual order.

  • last: this value refers to the last window you opened.

Log Type

Type of log monitoring to perform on the page you want to steer.

Specify one of these values:

  • Console logs that refer to the console tabs in the browsers DevTools.

  • Network logs that refer to the logged messages in the network tabs of the browsers DevTools.

Stop HTML Log Monitoring

Stops 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. You need to specify at least one of the search criteria: Title, Url, or Window Index.

Value

Description

Title

Caption of the browser window you want to steer.

You can also add a wildcard *. If you want 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, in case multiple browser windows match the previous criteria.

Specify one of these values:

  • <integer>: this index only refers to the opening time of the windows, not their visual order.

  • last: this value refers to the last window you opened.

Log Type

Type of log monitoring to perform on the page you want to steer.

Specify one of these values:

  • Console logs that refer to the console tabs in the browsers DevTools.

  • Network logs that refer to the logged messages in the network tabs of the browsers DevTools.

Log File Path

Location where you want to save report files with the log entries that occurred between the start and the stop tasks. It generates different log files based on the Log Type:

  • Plain text files for Console logs.

  • JSON files for Network logs.

Specify the folder path.

Steer Dialog Box

Steers JavaScript dialog boxes in your application, which increases your testing accuracy. You need to specify at least one of the search criteria: Title, Url, or Window Index.

Note that you need to steer the page before you steer the dialog box.

Value

Description

Title

Caption of the browser window you want to steer.

You can also add a wildcard *. If you want 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, in case multiple browser windows match the previous criteria.

Specify one of these values:

  • <integer>: this index only refers to the opening time of the windows, not their visual order.

  • last: this value refers to the last window you opened.

Confirmation

Response you want to send to a confirmation dialog.

Specify one of these values.

  • True: the response is OK.

  • False: the response is Cancel.

PromptText

Text you want to enter in the text input field of a prompt dialog.

Check Webpage for Broken Links

Checks for any links that return client error responses (400-499) or server error responses (500-599). This helps you verify that there are no broken links on your pages.

Note that Tosca Cloud 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.

You need to specify at least one of the search criteria: Title, Url, or Window Index.

Value

Description

Title

Identifies the webpage containing the links you want to verify using the page's HTML title.

You can also add a wildcard *. If you want to use the only open tab 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:

  • <integer>: this index only refers to the opening time of the windows, not their visual order.

  • last: this value refers to the last window you opened.

Ignore Errors

If you'd like to ignore specific response errors from this verification, specify the error code.

For instance, if you'd like to ignore 403 ("Forbidden") responses, enter 403. In this case, Tosca Cloud ignores any 403 response errors during the verification.

Read Web QR/Barcode

Verifies or buffers any QR code or barcode in a browser.

Note that this module needs to work with an existing browser session to read QR codes. This means that the web page containing the QR or barcodes you want to read must be open at the time of the verification.

Value

Description

Title*

HTML title of the webpage containing the QR 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*

URL of the currently open webpage containing the QR or barcodes you want to verify or buffer.

For example, http://support.tricentis.com.

Window Index*

Index of the browser window containing the QR or barcodes you want to verify or buffer.

You can use any of these values:

  • A number to indicate the <n>th window you opened. For example, 3 to define that you want to steer the third window you opened. You can enter any positive integer.

  • last to define the last window you opened.

Type

Select the kind of code you want to verify or buffer.

You can use any of these values:

  • QR

  • Barcode

  • All

Index

Index position of the QR or barcode you want to verify or buffer. For example, enter 3 to verify the third QR code on the page.

To verify or buffer all QR and barcodes on a page, omit Index.

Value

Enter the expected value to verify.

For example, http://www.example.com/download

* You need to specify at least one of these values in your test case so that Tosca Cloud 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 test case.