Click or drag to resize

WebElementPattern Class

A search pattern for elements of the tested Web pages.
Inheritance Hierarchy

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

The WebElementPattern type exposes the following members.

Constructors
  NameDescription
Public methodWebElementPattern
Creates a new instance of the WebElementPattern class.
Top
Properties
  NameDescription
Public propertyaccept
The accept attribute value of the sought-for web element. By default, TestLeft searches for the exact match. To mark variable parts, use wildcards (* or ?) or specify regular expressions (regexp:...).
Public propertyaction
The action attribute value of the sought-for web element. By default, TestLeft searches for the exact match. To mark variable parts, use wildcards (* or ?) or specify regular expressions (regexp:...).
Public propertyalt
The alt attribute of the sought-for web element. By default, TestLeft searches for the exact match. To mark variable parts, use wildcards (* or ?) or specify regular expressions (regexp:...).
Public propertycontentText
The text the sought-for object contains (including the text of child elements). By default, TestLeft searches for the exact match. To mark variable parts, use wildcards (* or ?) or specify regular expressions (regexp:...).
Public propertycontrols
The controls attribute value of the sought-for web element.
Public propertydata
Applied to OBJECT elements. Specifies the data attribute value of the sought-for element. By default, TestLeft searches for the exact match. To mark variable parts, use wildcards (* or ?) or specify regular expressions (regexp:...).
Public propertydownload
The download attribute value of the sought-for web element. By default, TestLeft searches for the exact match. To mark variable parts, use wildcards (* or ?) or specify regular expressions (regexp:...).
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 propertyenctype
The enctype attribute value of the sought-for web element. By default, TestLeft searches for the exact match. To mark variable parts, use wildcards (* or ?) or specify regular expressions (regexp:...).
Public propertyform
The form attribute value of the sought-for web element (for example, of the sought-for select element). By default, TestLeft searches for the exact match. To mark variable parts, use wildcards (* or ?) or specify regular expressions (regexp:...).
Public propertyhostname
The hostname property value of the sought-for a web element. By default, TestLeft searches for the exact match. To mark variable parts, use wildcards (* or ?) or specify regular expressions (regexp:...).
Public propertyhref
The href attribute value of the sought-for web element. By default, TestLeft searches for the exact match. To mark variable parts, use wildcards (* or ?) or specify regular expressions (regexp:...).
Public propertyhtmlFor
The for attribute value of the sought-for web element. By default, TestLeft searches for the exact match. To mark variable parts, use wildcards (* or ?) or specify regular expressions (regexp:...).
Public propertyidStr
The id attribute of the sought-for object with special characters replaced with underscores. Check the property value in the TestLeft UI Spy panel before writing code.
Public propertylength
Applied to FORM elements. Specifies the length property value of the sought-for form.
Public propertymethod
The method property value of the sought-for web element. By default, TestLeft searches for the exact match. To mark variable parts, use wildcards (* or ?) or specify regular expressions (regexp:...).
Public propertymultiple
The multiple property value of the sought-for web element.
Public propertyObjectIdentifier
The string TestLeft uses to identify the sought-for web element: the ID or name attribute values, the file name for IMGs and so on. Check the property value in the TestLeft UI Spy panel before writing code. By default, TestLeft searches for the exact match. To mark variable parts, use wildcards (* or ?) or specify regular expressions (regexp:...).
Public propertyObjectLabel
The label or text of the sought-for object. Check this value in the TestLeft UI Spy panel before setting it in your test. By default, TestLeft searches for the exact match. To mark variable parts, use wildcards (* or ?) or specify regular expressions (regexp:...).
Public propertyObjectType
Specifies the type of the sought-for web element. This property reflects the role of the element on the page: Link, Cell, CheckBox and so on. Check the property value in the TestLeft UI Spy panel before writing code.
Public propertypathname
The pathname property value of the sought-for web element. By default, TestLeft searches for the exact match. To mark variable parts, use wildcards (* or ?) or specify regular expressions (regexp:...).
Public propertyplaceholder
The placeholder attribute value of the sought-for web element. By default, TestLeft searches for the exact match. To mark variable parts, use wildcards (* or ?) or specify regular expressions (regexp:...).
Public propertyreadOnly
Specifies whether the sought-for web object has the readonly attribute.
Public propertyrole
The role attribute value of the sought-for web element. By default, TestLeft searches for the exact match. To mark variable parts, use wildcards (* or ?) or specify regular expressions (regexp:...).
Public propertysize
The size attribute value of the sought-for web element.
Public propertysrc
The src attribute value of the sought-for web element. By default, TestLeft searches for the exact match. To mark variable parts, use wildcards (* or ?) or specify regular expressions (regexp:...).
Public propertytagName
The tag name of the sought-for web element.
Public propertytarget
The target attribute value of the sought-for web element. By default, TestLeft searches for the exact match. To mark variable parts, use wildcards (* or ?) or specify regular expressions (regexp:...).
Public propertytitle
The title attribute value of the sought-for web element. By default, TestLeft searches for the exact match. To mark variable parts, use wildcards (* or ?) or specify regular expressions (regexp:...).
Public propertytype
The type attribute value of the sought-for web element. By default, TestLeft searches for the exact match. To mark variable parts, use wildcards (* or ?) or specify regular expressions (regexp:...).
Public propertyVisible
Specifies whether the sought-for controls are visible (a control may be out of the screen, but still visible).
(Inherited from ControlPattern.)
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