Setting Browser Recording Options

Specify custom attributes, browser attributes to ignore while recording, and whether to record native user input instead of DOM functions.

Silk Test Workbench includes a sophisticated locator generator mechanism that guarantees locators are unique at the time of recording and are easy to maintain. Depending on your application and the frameworks that you use, you might want to modify the default settings to achieve the best results. You can use any property that is available in the respective technology as a custom attribute given that they are either numbers (integers, doubles), strings, item identifiers, or enumeration values.

In xBrowser applications, you can also retrieve arbitrary properties and then use those properties as custom attributes. To achieve optimal results, add a custom automation ID to the elements that you want to interact with in your test.

  1. Click Tools > Options.
  2. Click the plus sign (+) next to Record in the Options menu tree.
    The Record options display in the right side panel.
  3. Click xBrowser.
  4. To add a custom attribute for a Web application, in the Custom attributes text box, type the attributes that you want to use. Using a custom attribute is more reliable than other attributes like caption or index, since a caption will change when you translate the application into another language, and the index might change whenever another object is added before one you have defined already.
    Note: To include custom attributes in a Web application, add them to the html tag. For example type, <input type='button' MyAutomationID='abc' value='click me' /> to add an attribute called MyAutomationID.

    If more than one object is assigned the same custom attribute value, all the objects with that value will return when you call the custom attribute. For example, if you assign the unique ID, loginName to two different text fields, both fields will return when you call the loginName attribute.

    Note: There is a 62 character limit to attribute names.
  5. In the Locator attribute name exclude list text box, type the attribute names to ignore while recording. Use this list to specify attributes that change frequently, such as size, width, height, and style. You can include the wildcards '*' and '?' in the Locator attribute name exclude list. For example, if you do not want to record attributes named height, add the height attribute name to the list. Separate attribute names with a comma.
  6. In the Locator attribute value exclude list text box, type the attribute values to ignore while recording. For example, if you do not want to record attributes assigned the value of x-auto, add the x-auto attribute value to the list. Some AJAX frameworks generate attribute values that change every time the page is reloaded. Use this list to ignore such values. You can also use wildcards in this list. Separate attribute names with a comma.
  7. To record native user input instead of DOM functions, from the Record native user input list box, select Yes. For example, to record Click instead of DomClick and TypeKeys instead of SetText, select Yes. If your application uses a plug-in or AJAX, specify Yes to use native user input. If your application does not use a plug-in or AJAX, we recommend using high-level DOM functions, which do not require the browser to be focused or active during playback. As a result, tests that use DOM functions are faster and more reliable.
  8. To enable iframe and frame support for browsers, select Yes from the Enable iframe support list. If you are not interested in the content of the iframes in a web application, disabling the iframe support might improve replay performance. For example, disabling the iframe support might significantly improve replay performance for web pages with many adds and when testing in a mobile browser. This option is ignored by Internet Explorer. This option is enabled by default.
  9. Click OK.