public class UIAElement extends Object implements UIAutomationElement, MobileElement
UIAElement
is the super class for all user interface elements in the context of the Automation
instrument for automating user interface testing of iOS apps. This interface defines more general methods that can be
used on any type of user interface elements.Constructor and Description |
---|
UIAElement(String locator) |
Modifier and Type | Method and Description |
---|---|
void |
doubleTap(Object... expected)
Double-taps the specified element.
|
org.openqa.selenium.WebElement |
findElement(String locator)
Finds the corresponding web element using the string locator.
|
protected SeLionIOSBridgeDriver |
getBridgeDriver() |
String |
getLabel()
Returns a string containing the label attribute of the element.
|
String |
getLocator()
Returns a string containing the locator used for the element
|
String |
getName()
Returns a string containing the name attribute of the element.
|
String |
getValue()
Returns a string containing a value attribute specific to the type of element.
|
void |
scrollToVisible()
Scrolls until the specified element is visible in a container view.
|
protected void |
setBridgeDriver(SeLionIOSBridgeDriver bridgeDriver) |
protected void |
setLocator(String locator) |
void |
tap(Object... expected)
Taps the specified element and optionally waits for the provided expected elements.
|
void |
tapWithOptions(EnumMap<GestureOptions,String> gestureOptions,
Object... expected)
Performs the specified gesture on the specified element using a
EnumMap to specify gesture attributes. |
void |
twoFingerTap(Object... expected)
Performs a two-finger (two-touch) tap on this element.
|
protected void |
waitFor(Object... expected) |
public UIAElement(String locator)
protected SeLionIOSBridgeDriver getBridgeDriver()
protected void setBridgeDriver(SeLionIOSBridgeDriver bridgeDriver)
protected void setLocator(String locator)
public org.openqa.selenium.WebElement findElement(String locator)
UIAutomationElement
By
entity and fed to RemoteWebElement.findElement(By)
for further processing.findElement
in interface MobileElement
findElement
in interface UIAutomationElement
locator
- A String that represents the means to locate this element (could be id/name/xpath/css locator).WebElement
found by the locator.public void doubleTap(Object... expected)
UIAutomationElement
doubleTap
in interface UIAutomationElement
expected
- Expected entities in the form of objects extending UIAElement
, xpath location in the form of
String
, instances of ExpectedCondition
, or an instance of a WebPage
public void scrollToVisible()
UIAutomationElement
scrollToVisible
in interface UIAutomationElement
public void tap(Object... expected)
UIAutomationElement
tap
in interface MobileElement
tap
in interface UIAutomationElement
expected
- Expected entities in the form of objects extending UIAElement
, xpath location in the form of
String
, instances of ExpectedCondition
, or an instance of a WebPage
public void tapWithOptions(EnumMap<GestureOptions,String> gestureOptions, Object... expected)
UIAutomationElement
EnumMap
to specify gesture attributes.
Refer GestureOptions
for specifying gesture options.tapWithOptions
in interface UIAutomationElement
gestureOptions
- EnumMap
specifying the gesture attributes.expected
- Expected entities in the form of objects extending UIAElement
, xpath location in the form of
String
, instances of ExpectedCondition
, or an instance of a WebPage
public void twoFingerTap(Object... expected)
UIAutomationElement
twoFingerTap
in interface UIAutomationElement
expected
- Expected entities in the form of objects extending UIAElement
, xpath location in the form of
String
, instances of ExpectedCondition
, or an instance of a WebPage
public String getLabel()
UIAutomationElement
getLabel
in interface UIAutomationElement
public String getName()
UIAutomationElement
getName
in interface UIAutomationElement
public String getValue()
UIAutomationElement
getValue
in interface MobileElement
getValue
in interface UIAutomationElement
public String getLocator()
UIAutomationElement
getLocator
in interface MobileElement
getLocator
in interface UIAutomationElement
protected void waitFor(Object... expected)
Copyright © 2016 PayPal Open Source. All rights reserved.