In SilkTest what is a Property?
- Every built-in 4Test class contains a set of methods and a set of properties
- Properties reflect the physical characteristics of an object
- Properties can be called directly from functions or testcases to perform operations other than verification
- Properties allow information associated with a window to be accessed as if it were stored in a variable:
The GET method:
- When properties are used for verification via the Verify Window dialog, the property can only geta value
- A Get method returns a value and does not take an argument
- When a property name appears to the right of an assignment "=" operator, the Get function is called;
[ ] // this is the same as calling the GetText method [ ] STRING sText = CustomerInformation.FirstName.sValue
The SET method:
- A property may set a value, although most properties geta value.
- A Set method may not return a value and takes only one argument.
- When a property name appears to the left of the assignment "=" operator, the Set method is called;
[ ] // this is the same as calling the SetText method [ ] CustomerInformation.FirstName.sValue = "John"
- In addition to the 4Test properties defined for a class, a class may have intrinsic (built-in) properties of its own;
- Intrinsic properties are preceded by a dollar sign "$"
- Intrinsic properties are listed in the Library Browser, but do not include a description or detailed syntax.
- When you declare a property within a window class declaration, the property is available for use in all windows of that class.
- When you declare a property within a window declaration, the property is available for use only by that window. The property declaration within a window overrides any property of the same name in the window"s class
Old KB# 21124