Interface IWebElement
Base interface for Web test objects.
Inherited Members
Namespace: HP.LFT.SDK.Web
Assembly: HP.LFT.SDK.dll
Syntax
public interface IWebElement : ITestObject, IClickable, IWebTestObject, IWebDescriber, ITestObjectDescriber, ILocationInfoProvider, ISupportsNativeObject, IVisibleProvider, ISupportDragAndDrop
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.
Properties
AccessibilityName
Returns this element's AccessibilityName.
Declaration
string AccessibilityName { get; }
Property Value
| Type | Description |
|---|---|
| string |
CSSSelector
returns this Element's CSS Selector.
Declaration
string CSSSelector { get; }
Property Value
| Type | Description |
|---|---|
| string |
Role
The object's role property.
Declaration
string Role { get; }
Property Value
| Type | Description |
|---|---|
| string |
XPath
Returns this element's XPath.
Declaration
string XPath { get; }
Property Value
| Type | Description |
|---|---|
| string |
Methods
DoubleClick()
Clicks on the this object twice.
Declaration
void DoubleClick()
Remarks
If you are testing a Web or hybrid mobile application on a Mobile device, this method is equivalent to performing a DoubleTap gesture.
DoubleClick(WebDoubleClickArgs)
Clicks on this object twice according to the specified behavior.
Declaration
void DoubleClick(WebDoubleClickArgs args)
Parameters
| Type | Name | Description |
|---|---|---|
| WebDoubleClickArgs | args | The WebDoubleClickArgs arguments that define the behavior of the double click operation. |
Remarks
If you are testing a Web or hybrid mobile application on a Mobile device, this method is equivalent to performing a DoubleTap gesture.
FireEvent(EventInfo)
Triggers the specified event on this object.
Declaration
void FireEvent(EventInfo eventInfo)
Parameters
| Type | Name | Description |
|---|---|---|
| EventInfo | eventInfo | The event info describing the event to trigger. The event can be any HTML DOM event. |
Remarks
Use the EventInfoFactory static class to generate the eventInfo argument value.
HoverTap()
When hover is supported, places the pointer on this object. Otherwise, taps this object at the specified location.
Declaration
void HoverTap()
HoverTap(Location)
When hover is supported, places the pointer on this object. Otherwise, taps this object at the specified location.
Declaration
void HoverTap(Location location)
Parameters
| Type | Name | Description |
|---|---|---|
| Location | location | The Location to hover over. |
LongPress()
Presses and holds this object.
Declaration
void LongPress()
Remarks
This method is not supported in Internet Explorer.
LongPress(WebLongPressArgs)
Presses and holds this object according to the specified behavior.
Declaration
void LongPress(WebLongPressArgs args)
Parameters
| Type | Name | Description |
|---|---|---|
| WebLongPressArgs | args | The WebLongPressArgs arguments that define the behavior of the long press operation. |
Pan(WebPanArgs)
Performs a pan gesture on this object according to the specified behavior.
Declaration
void Pan(WebPanArgs args)
Parameters
| Type | Name | Description |
|---|---|---|
| WebPanArgs | args | The WebPanArgs arguments that define the behavior of the pan operation. |
Remarks
This method is not supported in Internet Explorer.
Pan(long, long)
Performs a pan gesture on this object.
Declaration
void Pan(long deltaX, long deltaY)
Parameters
| Type | Name | Description |
|---|---|---|
| long | deltaX | The distance moved on the x-axis. |
| long | deltaY | The distance moved on the y-axis. |
Remarks
This method is not supported in Internet Explorer.
Pinch(WebPinchArgs)
Performs a pinch gesture on this object according to the specified behavior.
Declaration
void Pinch(WebPinchArgs args)
Parameters
| Type | Name | Description |
|---|---|---|
| WebPinchArgs | args | The WebPinchArgs arguments that define the behavior of the pinch operation. |
Pinch(double)
Performs a pinch gesture of the specified scale on this object.
Declaration
void Pinch(double scale)
Parameters
| Type | Name | Description |
|---|---|---|
| double | scale | The zoom scale resulting from the pinch gesture. This is the ratio between the distance between the fingers at the end of the pinch gesture to the distance between the fingers at the beginning of the pinch gesture. For example, if you were to touch a screen with your fingers 6 cm apart, and pinch until your fingers were 3 cm apart, the scale would be 0.5. Likewise, if your fingers were 3 cm apart, and you pinch until your fingers are 6 cm apart, the scale would be 2. |
Remarks
This method is not supported in Internet Explorer.
Swipe(SwipeDirection)
Swipes this object in the specified direction.
Declaration
void Swipe(SwipeDirection direction)
Parameters
| Type | Name | Description |
|---|---|---|
| SwipeDirection | direction | The direction of the swipe gesture. Possible values: SwipeDirection. |
Remarks
This method is not supported in Internet Explorer.
Swipe(WebSwipeArgs)
Swipes this object according to the specified behavior.
Declaration
void Swipe(WebSwipeArgs args)
Parameters
| Type | Name | Description |
|---|---|---|
| WebSwipeArgs | args | The WebSwipeArgs arguments that define the behavior of the swipe operation. |