Object Recognition for xBrowser Objects

This functionality is supported only if you are using the Open Agent.

The xBrowser technology domain supports dynamic object recognition.

When you record a test case with the Open Agent, Silk Test Classic creates locator keywords in an INC file to create scripts that use dynamic object recognition and window declarations.

Existing test cases that use dynamic object recognition without locator keywords in an INC file will continue to be supported. You can replay these tests, but you cannot record new tests with dynamic object recognition without locator keywords in an INC file.

Test cases use locator strings to find and identify objects. A typical locator includes a locator name and at least one locator attribute, such as "//LocatorName[@locatorAttribute='value']".

Locator Names
With other technology types, such as Java SWT, locator names are created using the class name of the test object. With xBrowser, the tag name of the DOM element can also be used as locator name. The following locators describe the same element:
  1. Using the tag name: "//a[@href='https://www.microfocus.com']"
  2. Using the class name: "//DomLink[@href='https://www.microfocus.com']"

To optimize replay speed, use tag names rather than class names.

Locator Attributes
All DOM attributes can be used as locator string attributes. For example, the element <button automationid='123'>Click Me</button> can be identified using the locator "//button[@automationid='123']".
Recording Locators
Silk Test Classic uses a built-in locator generator when recording test cases and using the Locator Spy. You can configure the locator generator to improve the results for a specific application.