HTML Modules

The folder TBox XEngines->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:

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 "Specifying the browser").

UseActiveTab

If you set this ModuleAttribute to True, Test Automation for SAP Commander looks for an open browser window when it executes the TestStep based on this Module. If it finds an open browser, it opens the URL in the active tab of this browser. If Test Automation for SAP Commander cannot find an open browser, it opens the URL in a new browser window.

If this ModuleAttribute is set to False or empty, Test Automation for SAP Commander opens the URL in a new browser window.

The XBrowser Engine 3.0 doesn't validate whether the URL you entered is accessible. Even if the URL is unreachable, the TestStep passes.

If you want to use arguments with Internet Explorer, set the registry key TabProcGrowth with value 0 in HKLM_CURRENT_USER\Software\Microsoft\Internet Explorer\Main.

In this example, you open the URL https://support.tricentis.com . If a browser window is already open, Test Automation for SAP Commander opens the page in the active tab of this window. You do not pass any command line arguments.

Open a website

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 "Specifying the browser").

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