IWebElement Interface
Base interface for Web test objects.

C# Syntax

Remarks
Any <div> tag can be represented as an IWebElement. Any element can be referred to as a WebElement. For example, a button can be searched for as a web element, but not vice versa.
Public Properties
 NameDescription
PropertyAbsoluteLocationThis object's coordinates relative to the screen (in pixels). 0,0 is the top-left corner of the (primary) monitor. (Inherited from HP.LFT.SDK.ILocationInfoProvider)
PropertyAccessibilityNameReturns this element's AccessibilityName.  
PropertyAttributesReturns a copy of the collection of attributes that is attached to the element for example, "id","class", ... (Inherited from HP.LFT.SDK.Web.IWebTestObject)
PropertyClassNameThe object's CSS class. (Inherited from HP.LFT.SDK.Web.IWebTestObject)
PropertyCSSSelectorreturns this Element's CSS Selector.  
PropertyDisplayNameThe object display name defined in the Application Model. (Inherited from HP.LFT.SDK.ITestObject)
PropertyIdThe object's HTML identifier. (Inherited from HP.LFT.SDK.Web.IWebTestObject)
PropertyInnerHTMLThe HTML code contained between the object's start and end tags. (Inherited from HP.LFT.SDK.Web.IWebTestObject)
PropertyInnerTextThe text contained between the object's start and end tags. (Inherited from HP.LFT.SDK.Web.IWebTestObject)
PropertyIsVisibleIndicates whether the current element is visible. (Inherited from HP.LFT.SDK.IVisibleProvider)
PropertyLocationThis object's coordinates relative to the parent window in pixels. (Inherited from HP.LFT.SDK.ILocationInfoProvider)
PropertyNameThe object's name property. (Inherited from HP.LFT.SDK.Web.IWebTestObject)
PropertyNativeObjectReturns the native application object that is represented by this test object instance, enabling you to access the native properties and methods provided by that object. (Inherited from HP.LFT.SDK.ISupportsNativeObject)
PropertyOuterHTMLThe object's HTML code and its content. (Inherited from HP.LFT.SDK.Web.IWebTestObject)
PropertyOuterTextThe object's text. (Inherited from HP.LFT.SDK.Web.IWebTestObject)
PropertyParentThe parent test object of this test object. The child object must be obtained using the Describe method, otherwise, it returns null. (Inherited from HP.LFT.SDK.ITestObject)
PropertyRoleThe object's role property.  
PropertySizeThis object's size in pixels. (Inherited from HP.LFT.SDK.ILocationInfoProvider)
PropertyStylesReturns the element's computed styles as a dictionary with the name of the style as the key. (Inherited from HP.LFT.SDK.Web.IWebTestObject)
PropertyTagNameThe object's HTML tag. (Inherited from HP.LFT.SDK.Web.IWebTestObject)
PropertyTitleThe element's title attribute. (Inherited from HP.LFT.SDK.Web.IWebTestObject)
PropertyXPathReturns this element's XPath.  
Top
Public Methods
 NameDescription
MethodClickClicks on this object. (Inherited from HP.LFT.SDK.IClickable)
MethodDescribe<TChild>Creates a child test object of this test object. (Inherited from HP.LFT.SDK.ITestObjectDescriber)
MethodDoubleClickOverloaded. Clicks on the this object twice.  
MethodDragAndDropOnDrags and drops a test object to the specified target object. (Inherited from HP.LFT.SDK.ISupportDragAndDrop)
MethodExistsChecks whether this object exists in the AUT before the default object synchronization timeout elapses. (Inherited from HP.LFT.SDK.ITestObject)
MethodFindChildren<TChild>Returns all the child test objects that match the specified test object type and description filter. For example, you can use this method to retrieve all Web buttons on a Page with type="submit". (Inherited from HP.LFT.SDK.ITestObject)
MethodFireEventTriggers the specified event on this object.  
MethodGetAttributeReturns the value of a single attribute. (Inherited from HP.LFT.SDK.Web.IWebTestObject)
MethodGetComputedStyleReturns the value of a single style. (Inherited from HP.LFT.SDK.Web.IWebTestObject)
MethodGetDescriptionReturns a clone of the description for this test object. The test object must be obtained using the Describe method, otherwise, this method returns null. (Inherited from HP.LFT.SDK.ITestObject)
MethodGetSnapshotCaptures a bitmap of this test object and returns a System.Drawing.Image of it. (Inherited from HP.LFT.SDK.ITestObject)
MethodGetTextLocationsReturns all rectangle areas containing the specified text within this object (Windows only). (Inherited from HP.LFT.SDK.ITestObject)
MethodGetVisibleTextReturns all visible text from this object. (Inherited from HP.LFT.SDK.ITestObject)
MethodHighlightHighlights this object in the AUT. (Inherited from HP.LFT.SDK.ITestObject)
MethodHighlightMatches<TChild>Highlights all children that match the specified test object type and description filter. (Inherited from HP.LFT.SDK.ITestObject)
MethodHoverTapOverloaded. When hover is supported, places the pointer on this object. Otherwise, taps this object at the specified location.  
MethodLongPressOverloaded. Presses and holds this object.  
MethodPanOverloaded. Performs a pan gesture on this object.  
MethodPinchOverloaded. Performs a pinch gesture of the specified scale on this object.  
MethodSetDescriptionReplaces this test object's description with the supplied description. (Inherited from HP.LFT.SDK.ITestObject)
MethodSwipeOverloaded. Swipes this object in the specified direction.  
MethodVerifyImageExistsChecks whether a snapshot of this object contains the supplied image. (Inherited from HP.LFT.SDK.ITestObject)
MethodVerifyImageMatchChecks whether a snapshot of this object and the supplied image are a match, given the specified pixel and RGB tolerance values. (Inherited from HP.LFT.SDK.ITestObject)
Top