Interface IWebElement
Base interface for Web test objects.
public interface IWebElement : ITestObject, IClickable, IWebTestObject, IWebDescriber, ITestObjectDescriber, ILocationInfoProvider, ISupportsNativeObject, IVisibleProvider, ISupportDragAndDrop
- Inherited Members
- Extension Methods
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.
string AccessibilityName { get; }
Property Value
CSSSelector
returns this Element's CSS Selector.
string CSSSelector { get; }
Property Value
Role
The object's role property.
string Role { get; }
Property Value
XPath
Returns this element's XPath.
string XPath { get; }
Property Value
Methods
DoubleClick()
Clicks on the this object twice.
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.
void DoubleClick(WebDoubleClickArgs args)
Parameters
argsWebDoubleClickArgsThe 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.
void FireEvent(EventInfo eventInfo)
Parameters
eventInfoEventInfoThe 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.
void HoverTap()
HoverTap(Location)
When hover is supported, places the pointer on this object. Otherwise, taps this object at the specified location.
void HoverTap(Location location)
Parameters
LongPress()
Presses and holds this object.
void LongPress()
Remarks
This method is not supported in Internet Explorer.
LongPress(WebLongPressArgs)
Presses and holds this object according to the specified behavior.
void LongPress(WebLongPressArgs args)
Parameters
argsWebLongPressArgsThe 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.
void Pan(WebPanArgs args)
Parameters
argsWebPanArgsThe 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.
void Pan(long deltaX, long deltaY)
Parameters
Remarks
This method is not supported in Internet Explorer.
Pinch(WebPinchArgs)
Performs a pinch gesture on this object according to the specified behavior.
void Pinch(WebPinchArgs args)
Parameters
argsWebPinchArgsThe WebPinchArgs arguments that define the behavior of the pinch operation.
Pinch(double)
Performs a pinch gesture of the specified scale on this object.
void Pinch(double scale)
Parameters
scaledoubleThe 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.
void Swipe(SwipeDirection direction)
Parameters
directionSwipeDirectionThe 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.
void Swipe(WebSwipeArgs args)
Parameters
argsWebSwipeArgsThe WebSwipeArgs arguments that define the behavior of the swipe operation.