Recording Existing Html Class Attributes and Specifying the Hierarchy of Attributes

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

You must enable attribute recording to allow Silk Test Classic to capture Html class attribute information while recording.

  1. Click Record > Window Declarations, then click Edit Class Attributes.
  2. On the Edit Class Attributes dialog box, select Browser DOM from the Set list box.
  3. Select a class from the Class list box. For example, select HtmlCheckBox to specify attributes within the HtmlCheckBox class that you want to record.
  4. After you have selected a class, select the attribute you want to record from the list of attributes in the Defined attributes list box.
  5. Click >> to move the attribute to the Class attributes pane. You can only select a single attribute at a time.
  6. Select an attribute, then click Move Up or Move Down to indicate the order in which you want the attributes to appear when you paste the window declaration to the Editor. You may select only a single attribute at a time.
  7. Click OK to save your work and return to the Record Window Declarations dialog box. Silk Test Classic records the attribute tags in the order you have specified.

You can record custom class attributes in a test that uses hierarchical object recognition and Silk Test Classic will record the attribute tags in the order you have specified.

For example, record four attributes for the HtmlImage class. First you select id from the Defined Attributes list box, then you click >> to move it to the Class Attributes list box. You repeat that process for the name, rel, and src attributes. Once the four attributes are listed in the Class Attributes list box, you use Move Up and Move Down so that the attributes display in the order you want them to display.

After you click OK, Silk Test Classic displays the Record Window Declarations dialog box. Whenever Silk Test Classic recognizes an HtmlImage object, Silk Test Classic records the attributes you specified on the Edit Class Attributes dialog box. The full string for the attributes tag information that Silk Test Classic records is:

&id='myButton';name='button';src='file:???D:?buttonnext.gif';rel='start'