Adding a New Class Attribute and Specifying the Hierarchy of Attributes

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

You can add a new attribute to the list that Silk Test Classic records for an Html class and specify the order in which the attributes are recorded. Add custom attributes to a Web application to make a test more specific.

To capture class attribute information, you must first enable attribute 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. Type the name of the new attribute in the text box above Add and Remove, then click Add. There is a 62 character limit to attribute names. You may type in the name or you can copy and paste the name from the text editor. If you are typing in a long name, the field stops accepting characters after the 62nd character. If you paste in a long name, the name is truncated at 62 characters. The following characters are not allowed in attribute names: (space) ~`!@#$%^&*()_-+={[}]|\:;"’<,>.?/
  5. Click >> to move the new attribute to the Class Attributes pane.
  6. Select an attribute, then click Move Up or Move Down to indicate the order in which you want the attributes to display 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 will now record the new attribute tags in the order you specified. To record a test that uses the custom Html class attribute, you must use the Classic Agent.