Click or drag to resize

WindowPattern Class

A search pattern for window test objects.
Inheritance Hierarchy

Namespace:  SmartBear.TestLeft.TestObjects
Assembly:  SmartBear.TestLeft (in SmartBear.TestLeft.dll) Version: 14.70.237.11 (14.70.237.11)
Syntax
public class WindowPattern : ControlPattern

The WindowPattern type exposes the following members.

Constructors
  NameDescription
Public methodWindowPattern
Creates a new instance of the WindowPattern class.
Top
Properties
  NameDescription
Public propertyControlId
Specifies the window identifier for the search. The window identifier is the value that is returned by the GetWindowLong() or GetDlgCtrlID() Windows API function.
Public propertyEnabled
Specifies whether the sought-for control is enabled (true) or disabled (false). Disabled controls are typically displayed in grey.
(Inherited from ControlPattern.)
Public propertyIndex
The Index property value is the current front-to-back position (1-based) of the sought-for window among other windows that have the same class name and caption. You can see the index of a window in the TestLeft UI Spy panel.
Public propertyVisible
Specifies whether the sought-for controls are visible (a control may be out of the screen, but still visible).
(Inherited from ControlPattern.)
Public propertyWndCaption
The title or text of the sought-for window. By default, TestLeft searches for the exact match. To mark variable parts, use wildcards (* or ?) or specify regular expressions (regexp:...).
Public propertyWndClass
The window class name of the sought-for control as it is registered in the operating system. In some libraries, the class name changes from one application session to another. To mark variable parts in the class name, use wildcards (* or ?) or specify regular expressions (regexp:...).
Top
Methods
  NameDescription
Public methodAdd
Adds a custom property to the search pattern and returns the pattern object. You can explore your tested application in the TestLeft UI Spy to choose the appropriate property and value.
Protected methodDoAddCustomItem
Adds a custom property to the search pattern.
(Inherited from SearchPatternBase.)
Protected methodDoAddOwnItems (Overrides ControlPatternDoAddOwnItems(SearchPatternBaseSearchPatternItems).)
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetPatternItems (Inherited from SearchPatternBase.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodToString
Returns a user-friendly string representation of properties and values used in the search pattern.
(Inherited from SearchPatternBase.)
Top
See Also