Object Recognition

Silk4J identifies any control in the application under test (AUT) by combining the name of the control class and a collection of prioritized attributes into a unique XPath locator. If the combined XPath locator does not uniquely identify the control, Silk4J additionally adds an index to the locator. During recording, Silk4J allows you to select an alternative locator for a control from the list in the Locator field of the Choose Action dialog.

If you are recording WebDriver locators instead of Silk Test locators, Silk4J provides the following alternatives to the XPath locator when identifying a control:
  • Locate by id. Identifies the control by the id attribute.
  • Locate by name. Identifies the control by the name attribute.
  • Locate by link text. Only for hyperlinks.

Within Silk4J, literal references to identified objects are referred to as locators. Silk4J uses locators to find and identify objects in the application under test (AUT). Locators are a subset of the XPath query language, which is a common XML-based language defined by the World Wide Web Consortium, W3C.