public abstract class AppiumBy
extends org.openqa.selenium.By
implements org.openqa.selenium.By.Remotable
Modifier and Type | Class and Description |
---|---|
static class |
AppiumBy.ByAccessibilityId |
static class |
AppiumBy.ByAndroidDataMatcher |
static class |
AppiumBy.ByAndroidUIAutomator |
static class |
AppiumBy.ByAndroidViewMatcher |
static class |
AppiumBy.ByAndroidViewTag |
static class |
AppiumBy.ByClassName |
static class |
AppiumBy.ByCustom |
static class |
AppiumBy.ById |
static class |
AppiumBy.ByImage |
static class |
AppiumBy.ByIosClassChain |
static class |
AppiumBy.ByIosNsPredicate |
static class |
AppiumBy.ByName |
Modifier | Constructor and Description |
---|---|
protected |
AppiumBy(java.lang.String selector,
java.lang.String locatorString,
java.lang.String locatorName) |
Modifier and Type | Method and Description |
---|---|
static org.openqa.selenium.By |
accessibilityId(java.lang.String accessibilityId)
About Android accessibility
https://developer.android.com/intl/ru/training/accessibility/accessible-app.html
About iOS accessibility
https://developer.apple.com/library/ios/documentation/UIKit/Reference/
UIAccessibilityIdentification_Protocol/index.html
|
static org.openqa.selenium.By |
androidDataMatcher(java.lang.String dataMatcherString)
This locator strategy is only available in Espresso Driver mode.
|
static org.openqa.selenium.By |
androidUIAutomator(java.lang.String uiautomatorText)
Refer to https://developer.android.com/training/testing/ui-automator
|
static org.openqa.selenium.By |
androidViewMatcher(java.lang.String viewMatcherString)
This locator strategy is only available in Espresso Driver mode.
|
static org.openqa.selenium.By |
androidViewTag(java.lang.String tag)
This locator strategy is available in Espresso Driver mode.
|
static org.openqa.selenium.By |
className(java.lang.String selector)
For IOS it is the full name of the XCUI element and begins with XCUIElementType.
|
static org.openqa.selenium.By |
custom(java.lang.String selector)
This type of locator requires the use of the 'customFindModules' capability and a
separately-installed element finding plugin.
|
org.openqa.selenium.WebElement |
findElement(org.openqa.selenium.SearchContext context) |
java.util.List<org.openqa.selenium.WebElement> |
findElements(org.openqa.selenium.SearchContext context) |
static org.openqa.selenium.By |
id(java.lang.String selector)
For IOS the element name.
|
static org.openqa.selenium.By |
image(java.lang.String b64Template)
This locator strategy is available only if OpenCV libraries and
NodeJS bindings are installed on the server machine.
|
static org.openqa.selenium.By |
iOSClassChain(java.lang.String iOSClassChainString)
This locator strategy is available in XCUITest Driver mode.
|
static org.openqa.selenium.By |
iOSNsPredicateString(java.lang.String iOSNsPredicateString)
This locator strategy is available in XCUITest Driver mode.
|
static org.openqa.selenium.By |
name(java.lang.String selector)
For IOS the element name.
|
java.lang.String |
toString() |
cssSelector, equals, getJavascriptExecutor, getWebDriver, hashCode, linkText, partialLinkText, tagName, xpath
protected AppiumBy(java.lang.String selector, java.lang.String locatorString, java.lang.String locatorName)
public java.util.List<org.openqa.selenium.WebElement> findElements(org.openqa.selenium.SearchContext context)
findElements
in class org.openqa.selenium.By
public org.openqa.selenium.WebElement findElement(org.openqa.selenium.SearchContext context)
findElement
in class org.openqa.selenium.By
public java.lang.String toString()
toString
in class org.openqa.selenium.By
public static org.openqa.selenium.By accessibilityId(java.lang.String accessibilityId)
accessibilityId
- id is a convenient UI automation accessibility Id.AppiumBy.ByAndroidUIAutomator
public static org.openqa.selenium.By androidDataMatcher(java.lang.String dataMatcherString)
dataMatcherString
- is a valid json string detailing hamcrest matcher for Espresso onData().
See
the documentation for more detailsAppiumBy.ByAndroidDataMatcher
public static org.openqa.selenium.By androidUIAutomator(java.lang.String uiautomatorText)
uiautomatorText
- is Android UIAutomator stringAppiumBy.ByAndroidUIAutomator
public static org.openqa.selenium.By androidViewMatcher(java.lang.String viewMatcherString)
viewMatcherString
- is a valid json string detailing hamcrest matcher for Espresso onView().
See
the documentation for more detailsAppiumBy.ByAndroidViewMatcher
public static org.openqa.selenium.By androidViewTag(java.lang.String tag)
tag
- is a view tag stringAppiumBy.ByAndroidViewTag
public static org.openqa.selenium.By className(java.lang.String selector)
selector
- the class name of the elementAppiumBy.ByClassName
public static org.openqa.selenium.By id(java.lang.String selector)
selector
- element idAppiumBy.ById
public static org.openqa.selenium.By name(java.lang.String selector)
selector
- element idAppiumBy.ByName
public static org.openqa.selenium.By custom(java.lang.String selector)
selector
- selector to pass to the custom element finding pluginAppiumBy.ByCustom
public static org.openqa.selenium.By image(java.lang.String b64Template)
b64Template
- base64-encoded template image string. Supported image formats are the same
as for OpenCV library.AppiumBy.ByImage
public static org.openqa.selenium.By iOSClassChain(java.lang.String iOSClassChainString)
iOSClassChainString
- is a valid class chain locator string.
See
the documentation for more detailsAppiumBy.ByIosClassChain
public static org.openqa.selenium.By iOSNsPredicateString(java.lang.String iOSNsPredicateString)
iOSNsPredicateString
- is an iOS NsPredicate StringAppiumBy.ByIosNsPredicate