Attribute Definition and Verification

When you record a test case, you can verify the test case using attributes.

You can choose to verify using either attributes or properties. Generally you will verify using properties, because property verification is more flexible.

For example, the attributes for the DialogBox class are Caption, Contents, Default button, Enabled, and Focus. The following 4Test code implements the Default Button attribute in the winclass.inc file:
attribute "Default button", VerifyDefaultButton, QueryDefaultButton
As this 4Test code shows, each attribute definition begins with the statement, followed by the following three comma-delimited values:
  1. The text that you want to display in the Attribute panel of the Verify Window dialog box. This text must be a string.
  2. The method Silk Test Classic should use to verify the value of the attribute at runtime.
  3. The method Silk Test Classic should use to get the actual value of the attribute at runtime.