RequiredElementType
- the required type of class which implement WebElement
.
Instances of the defined type will be returned via findElement* and findElements*.
Warning (!!!). Allowed types:
WebElement
TouchableElement
RemoteWebElement
MobileElement
IOSElement
public class IOSDriver<RequiredElementType extends org.openqa.selenium.WebElement> extends AppiumDriver<RequiredElementType> implements IOSDeviceActionShortcuts, GetsNamedTextField<RequiredElementType>, FindsByIosUIAutomation<RequiredElementType>
org.openqa.selenium.remote.RemoteWebDriver.RemoteTargetLocator, org.openqa.selenium.remote.RemoteWebDriver.RemoteWebDriverOptions, org.openqa.selenium.remote.RemoteWebDriver.When
org.openqa.selenium.WebDriver.ImeHandler, org.openqa.selenium.WebDriver.Navigation, org.openqa.selenium.WebDriver.Options, org.openqa.selenium.WebDriver.TargetLocator, org.openqa.selenium.WebDriver.Timeouts, org.openqa.selenium.WebDriver.Window
KEY_CODE, PATH
Constructor and Description |
---|
IOSDriver(AppiumDriverLocalService service,
org.openqa.selenium.Capabilities desiredCapabilities) |
IOSDriver(AppiumDriverLocalService service,
org.openqa.selenium.remote.http.HttpClient.Factory httpClientFactory,
org.openqa.selenium.Capabilities desiredCapabilities) |
IOSDriver(AppiumServiceBuilder builder,
org.openqa.selenium.Capabilities desiredCapabilities) |
IOSDriver(AppiumServiceBuilder builder,
org.openqa.selenium.remote.http.HttpClient.Factory httpClientFactory,
org.openqa.selenium.Capabilities desiredCapabilities) |
IOSDriver(org.openqa.selenium.Capabilities desiredCapabilities) |
IOSDriver(org.openqa.selenium.remote.http.HttpClient.Factory httpClientFactory,
org.openqa.selenium.Capabilities desiredCapabilities) |
IOSDriver(URL remoteAddress,
org.openqa.selenium.Capabilities desiredCapabilities) |
IOSDriver(URL remoteAddress,
org.openqa.selenium.remote.http.HttpClient.Factory httpClientFactory,
org.openqa.selenium.Capabilities desiredCapabilities) |
Modifier and Type | Method and Description |
---|---|
org.openqa.selenium.remote.Response |
execute(String driverCommand,
Map<String,?> parameters) |
T |
findElement(org.openqa.selenium.By by) |
T |
findElementByAccessibilityId(String using) |
T |
findElementByClassName(String using) |
T |
findElementByCssSelector(String using) |
T |
findElementById(String id) |
RequiredElementType |
findElementByIosUIAutomation(String using) |
T |
findElementByLinkText(String using) |
T |
findElementByName(String using) |
T |
findElementByPartialLinkText(String using) |
T |
findElementByTagName(String using) |
T |
findElementByXPath(String using) |
List<RequiredElementType> |
findElementsByIosUIAutomation(String using) |
org.openqa.selenium.interactions.Mouse |
getMouse()
Deprecated.
|
RequiredElementType |
getNamedTextField(String name)
In iOS apps, named TextFields have the same accessibility Id as their
containing TableElement.
|
void |
hideKeyboard(String keyName)
Hides the keyboard by pressing the button specified by keyName if it is
showing.
|
void |
hideKeyboard(String strategy,
String keyName)
Hides the keyboard if it is showing.
|
void |
lockDevice(int seconds)
Lock the device (bring it to the lock screen) for a given number of
seconds
|
RequiredElementType |
scrollTo(String text)
Scroll to the element whose 'text' attribute contains the input text.
|
RequiredElementType |
scrollToExact(String text)
Scroll to the element whose 'text' attribute is equal to the input text.
|
void |
shake()
Simulate shaking the device
|
_isNotNullOrEmpty, _isNotNullOrEmpty, closeApp, context, execute, findElements, findElementsByAccessibilityId, findElementsByClassName, findElementsByCssSelector, findElementsById, findElementsByLinkText, findElementsByName, findElementsByPartialLinkText, findElementsByTagName, findElementsByXPath, getAppStringMap, getAppStringMap, getAppStringMap, getAppStrings, getAppStrings, getCommandImmutableMap, getCommandImmutableMap, getContext, getContextHandles, getDeviceTime, getExecuteMethod, getOrientation, getRemoteAddress, getSettings, hideKeyboard, installApp, isAppInstalled, launchApp, location, lockScreen, performMultiTouchAction, performTouchAction, pinch, pinch, pullFile, pullFolder, removeApp, resetApp, rotate, runAppInBackground, setLocation, setSetting, substituteMobilePlatform, swipe, tap, tap, zoom, zoom
close, executeAsyncScript, executeScript, findElement, findElements, get, getCapabilities, getCommandExecutor, getCurrentUrl, getElementConverter, getErrorHandler, getFileDetector, getKeyboard, getPageSource, getScreenshotAs, getSessionId, getTitle, getW3CStandardComplianceLevel, getWindowHandle, getWindowHandles, log, manage, navigate, quit, setCommandExecutor, setElementConverter, setErrorHandler, setFileDetector, setFoundBy, setLogLevel, setSessionId, startClient, startSession, startSession, stopClient, switchTo, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getDeviceTime, hideKeyboard
public IOSDriver(URL remoteAddress, org.openqa.selenium.Capabilities desiredCapabilities)
public IOSDriver(URL remoteAddress, org.openqa.selenium.remote.http.HttpClient.Factory httpClientFactory, org.openqa.selenium.Capabilities desiredCapabilities)
public IOSDriver(AppiumDriverLocalService service, org.openqa.selenium.Capabilities desiredCapabilities)
public IOSDriver(AppiumDriverLocalService service, org.openqa.selenium.remote.http.HttpClient.Factory httpClientFactory, org.openqa.selenium.Capabilities desiredCapabilities)
public IOSDriver(AppiumServiceBuilder builder, org.openqa.selenium.Capabilities desiredCapabilities)
public IOSDriver(AppiumServiceBuilder builder, org.openqa.selenium.remote.http.HttpClient.Factory httpClientFactory, org.openqa.selenium.Capabilities desiredCapabilities)
public IOSDriver(org.openqa.selenium.remote.http.HttpClient.Factory httpClientFactory, org.openqa.selenium.Capabilities desiredCapabilities)
public IOSDriver(org.openqa.selenium.Capabilities desiredCapabilities)
public RequiredElementType scrollTo(String text)
scrollTo
in interface ScrollsTo<org.openqa.selenium.WebElement>
scrollTo
in class AppiumDriver<RequiredElementType extends org.openqa.selenium.WebElement>
text
- input text contained in text attributepublic RequiredElementType scrollToExact(String text)
scrollToExact
in interface ScrollsTo<org.openqa.selenium.WebElement>
scrollToExact
in class AppiumDriver<RequiredElementType extends org.openqa.selenium.WebElement>
text
- input text to matchpublic void hideKeyboard(String strategy, String keyName)
IOSDeviceActionShortcuts
hideKeyboard
in interface IOSDeviceActionShortcuts
strategy
- HideKeyboardStrategykeyName
- a String, representing the text displayed on the button of the
keyboard you want to press. For example: "Done"IOSDeviceActionShortcuts.hideKeyboard(String, String)
public void hideKeyboard(String keyName)
IOSDeviceActionShortcuts
hideKeyboard
in interface IOSDeviceActionShortcuts
keyName
- The button pressed by the mobile driver to attempt hiding the
keyboardIOSDeviceActionShortcuts.hideKeyboard(String)
public void shake()
IOSDeviceActionShortcuts
shake
in interface IOSDeviceActionShortcuts
IOSDeviceActionShortcuts.shake()
public RequiredElementType getNamedTextField(String name)
GetsNamedTextField
getNamedTextField
in interface GetsNamedTextField<RequiredElementType extends org.openqa.selenium.WebElement>
name
- accessiblity id of TextFieldGetsNamedTextField.getNamedTextField(String)
public RequiredElementType findElementByIosUIAutomation(String using) throws org.openqa.selenium.WebDriverException
findElementByIosUIAutomation
in interface FindsByIosUIAutomation<RequiredElementType extends org.openqa.selenium.WebElement>
org.openqa.selenium.WebDriverException
- This method is not applicable with browser/webview UI.public List<RequiredElementType> findElementsByIosUIAutomation(String using) throws org.openqa.selenium.WebDriverException
findElementsByIosUIAutomation
in interface FindsByIosUIAutomation<RequiredElementType extends org.openqa.selenium.WebElement>
org.openqa.selenium.WebDriverException
- This method is not applicable with browser/webview UI.public void lockDevice(int seconds)
seconds
- number of seconds to lock the screen forpublic org.openqa.selenium.remote.Response execute(String driverCommand, Map<String,?> parameters)
execute
in interface MobileDriver
execute
in class org.openqa.selenium.remote.RemoteWebDriver
public T findElement(org.openqa.selenium.By by)
findElement
in interface GenericSearchContext<T extends org.openqa.selenium.WebElement>
findElement
in interface org.openqa.selenium.SearchContext
findElement
in interface org.openqa.selenium.WebDriver
findElement
in class org.openqa.selenium.remote.RemoteWebDriver
public T findElementById(String id)
findElementById
in interface GenericFindsById<T extends org.openqa.selenium.WebElement>
findElementById
in interface org.openqa.selenium.internal.FindsById
findElementById
in class org.openqa.selenium.remote.RemoteWebDriver
public T findElementByLinkText(String using) throws org.openqa.selenium.WebDriverException
findElementByLinkText
in interface GenericFindsByLinkText<T extends org.openqa.selenium.WebElement>
findElementByLinkText
in interface org.openqa.selenium.internal.FindsByLinkText
findElementByLinkText
in class org.openqa.selenium.remote.RemoteWebDriver
org.openqa.selenium.WebDriverException
- his method doesn't work against native app UI.public T findElementByPartialLinkText(String using) throws org.openqa.selenium.WebDriverException
findElementByPartialLinkText
in interface GenericFindsByLinkText<T extends org.openqa.selenium.WebElement>
findElementByPartialLinkText
in interface org.openqa.selenium.internal.FindsByLinkText
findElementByPartialLinkText
in class org.openqa.selenium.remote.RemoteWebDriver
org.openqa.selenium.WebDriverException
- his method doesn't work against native app UI.public T findElementByTagName(String using)
findElementByTagName
in interface GenericFindsByTagName<T extends org.openqa.selenium.WebElement>
findElementByTagName
in interface org.openqa.selenium.internal.FindsByTagName
findElementByTagName
in class org.openqa.selenium.remote.RemoteWebDriver
public T findElementByName(String using)
findElementByName
in interface GenericFindsByName<T extends org.openqa.selenium.WebElement>
findElementByName
in interface org.openqa.selenium.internal.FindsByName
findElementByName
in class org.openqa.selenium.remote.RemoteWebDriver
public T findElementByClassName(String using)
findElementByClassName
in interface GenericFindsByClassName<T extends org.openqa.selenium.WebElement>
findElementByClassName
in interface org.openqa.selenium.internal.FindsByClassName
findElementByClassName
in class org.openqa.selenium.remote.RemoteWebDriver
public T findElementByCssSelector(String using) throws org.openqa.selenium.WebDriverException
findElementByCssSelector
in interface GenericFindsByCssSelector<T extends org.openqa.selenium.WebElement>
findElementByCssSelector
in interface org.openqa.selenium.internal.FindsByCssSelector
findElementByCssSelector
in class org.openqa.selenium.remote.RemoteWebDriver
org.openqa.selenium.WebDriverException
- his method doesn't work against native app UI.public T findElementByXPath(String using)
findElementByXPath
in interface GenericFindsByXPath<T extends org.openqa.selenium.WebElement>
findElementByXPath
in interface org.openqa.selenium.internal.FindsByXPath
findElementByXPath
in class org.openqa.selenium.remote.RemoteWebDriver
public T findElementByAccessibilityId(String using) throws org.openqa.selenium.WebDriverException
findElementByAccessibilityId
in interface FindsByAccessibilityId<org.openqa.selenium.WebElement>
org.openqa.selenium.WebDriverException
@Deprecated public org.openqa.selenium.interactions.Mouse getMouse()
getMouse
in interface org.openqa.selenium.interactions.HasInputDevices
getMouse
in class org.openqa.selenium.remote.RemoteWebDriver
Copyright © 2016. All rights reserved.