Having problems with your account or logging in?
A lot of changes are happening in the community right now. Some may affect you. READ MORE HERE

In SilkTest what is a Property?

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

DISCLAIMER:

Some content on Community Tips & Information pages is not officially supported by Micro Focus. Please refer to our Terms of Use for more detail.
Top Contributors
Version history
Revision #:
1 of 1
Last update:
‎2013-02-15 19:17
Updated by:
 
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.