Using Regular Expressions in the Physical Description - WinRunner

WinRunner uses two “hidden” properties in order to use a regular expression in an object’s physical description. These properties are regexp_label and regexp_MSW_class.

The regexp_label property is used for windows only. It operates “behind the scenes” to insert a regular expression into a window’s label description.

The regexp_MSW_class property inserts a regular expression into an object’s MSW_class. It is obligatory for all types of windows and for the object class object.

Adding a Regular Expression

You can add the regexp_label and the regexp_MSW_class properties to the GUI configuration for a class as needed. You would add a regular expression in this way when either the label or the MSW class of objects in your application has characters in common that can safely be ignored.

Suppressing a Regular Expression

You can suppress the use of a regular expression in the physical description of a window. Suppose the label of all the windows in your application begins with “AAA Wingnuts —”. For WinRunner to distinguish between the windows, you could replace the regexp_label property in the list of obligatorylearned properties for windows in your application with the label property.

All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd Protection Status

WinRunner Topics