Supporting GUI-Specific Captions

Classic Agent

When you are using the Classic Agent, by default Silk Test Classic bases the tag for an object on the actual caption or label of the object. If the captions or labels change when the application is ported to a different GUI, you have two options:

  • You can have multiple tags, each based on the platform-specific caption or label.
  • You can have a single tag, using the index form of the tag, as long the relative position of the object is the same in the ported versions of the application.

Then, in your test cases, you can use the same identifier to refer to the object regardless of what the object’s actual label or caption is.

Open Agent

When you are using the Open Agent, Silk Test Classic creates locator keywords in an INC file to create scripts that use dynamic object recognition and window declarations. The locator is the actual name of the object, as opposed to the identifier, which is the logical name. Silk Test Classic uses the locator to identify objects in the application when executing test cases. Test cases never use the locator to refer to an object; they always use the identifier.

The advantages of using locators with an INC file include:
  • You combine the advantages of INC files with the advantages of dynamic object recognition. For example, scripts can use window names in the same manner as traditional, Silk Test Classic tag-based scripts and leverage the power of XPath queries.
  • Enhancing legacy INC files with locators facilitates a smooth transition from using hierarchical object recognition to new scripts that use dynamic object recognition. You use dynamic object recognition but your scripts look and feel like traditional, Silk Test Classic tag-based scripts that use hierarchical object recognition.
  • You can use AutoComplete to assist in script creation. AutoComplete requires an INC file.