T - 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
IOSElementpublic class IOSDriver<T extends WebElement> extends AppiumDriver<T> implements IOSDeviceActionShortcuts, FindsByIosUIAutomation<T>
org.openqa.selenium.remote.RemoteWebDriver.RemoteTargetLocator, org.openqa.selenium.remote.RemoteWebDriver.RemoteWebDriverOptions, org.openqa.selenium.remote.RemoteWebDriver.WhenWebDriver.ImeHandler, WebDriver.Navigation, WebDriver.Options, WebDriver.TargetLocator, WebDriver.Timeouts, WebDriver.Window| 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(org.openqa.selenium.remote.HttpCommandExecutor executor,
org.openqa.selenium.Capabilities capabilities) |
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)
Find the first
WebElement using the given method. |
T |
findElement(String by,
String using) |
T |
findElementByAccessibilityId(String using) |
T |
findElementByClassName(String using) |
T |
findElementByCssSelector(String using) |
T |
findElementById(String id) |
T |
findElementByIosUIAutomation(String using) |
T |
findElementByLinkText(String using) |
T |
findElementByName(String using) |
T |
findElementByPartialLinkText(String using) |
T |
findElementByTagName(String using) |
T |
findElementByXPath(String using) |
List<T> |
findElementsByIosUIAutomation(String using) |
org.openqa.selenium.interactions.Mouse |
getMouse()
Deprecated.
|
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.
|
void |
shake()
Simulate shaking the device.
|
void |
swipe(int startx,
int starty,
int endx,
int endy,
int duration)
Convenience method for swiping across the screen.
|
closeApp, context, doSwipe, execute, findElements, findElements, findElementsByAccessibilityId, findElementsByClassName, findElementsByCssSelector, findElementsById, findElementsByLinkText, findElementsByName, findElementsByPartialLinkText, findElementsByTagName, findElementsByXPath, getAppStringMap, getAppStringMap, getAppStringMap, getContext, getContextHandles, getDeviceTime, getExecuteMethod, getOrientation, getRemoteAddress, getSessionDetails, getSettings, hideKeyboard, installApp, isAppInstalled, launchApp, location, performMultiTouchAction, performTouchAction, pinch, pinch, pullFile, pullFolder, removeApp, resetApp, rotate, runAppInBackground, setLocation, setSetting, substituteMobilePlatform, tap, tap, zoom, zoomclose, executeAsyncScript, executeScript, 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, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetDeviceTime, hideKeyboardclose, get, getCurrentUrl, getPageSource, getTitle, getWindowHandle, getWindowHandles, manage, navigate, quit, switchTopublic IOSDriver(org.openqa.selenium.remote.HttpCommandExecutor executor,
org.openqa.selenium.Capabilities capabilities)
executor - is an instance of HttpCommandExecutor
or class that extends it. Default commands or another vendor-specific
commands may be specified there.capabilities - take a look
at Capabilitiespublic IOSDriver(URL remoteAddress, org.openqa.selenium.Capabilities desiredCapabilities)
remoteAddress - is the address
of remotely/locally started Appium serverdesiredCapabilities - take a look
at Capabilitiespublic IOSDriver(URL remoteAddress, org.openqa.selenium.remote.http.HttpClient.Factory httpClientFactory, org.openqa.selenium.Capabilities desiredCapabilities)
remoteAddress - is the address
of remotely/locally started Appium serverhttpClientFactory - take a look
at HttpClient.FactorydesiredCapabilities - take a look
at Capabilitiespublic IOSDriver(AppiumDriverLocalService service, org.openqa.selenium.Capabilities desiredCapabilities)
service - take a look
at AppiumDriverLocalServicedesiredCapabilities - take a look
at Capabilitiespublic IOSDriver(AppiumDriverLocalService service, org.openqa.selenium.remote.http.HttpClient.Factory httpClientFactory, org.openqa.selenium.Capabilities desiredCapabilities)
service - take a look
at AppiumDriverLocalServicehttpClientFactory - take a look
at HttpClient.FactorydesiredCapabilities - take a look
at Capabilitiespublic IOSDriver(AppiumServiceBuilder builder, org.openqa.selenium.Capabilities desiredCapabilities)
builder - take a look
at AppiumServiceBuilderdesiredCapabilities - take a look
at Capabilitiespublic IOSDriver(AppiumServiceBuilder builder, org.openqa.selenium.remote.http.HttpClient.Factory httpClientFactory, org.openqa.selenium.Capabilities desiredCapabilities)
builder - take a look
at AppiumServiceBuilderhttpClientFactory - take a look
at HttpClient.FactorydesiredCapabilities - take a look
at Capabilitiespublic IOSDriver(org.openqa.selenium.remote.http.HttpClient.Factory httpClientFactory,
org.openqa.selenium.Capabilities desiredCapabilities)
httpClientFactory - take a look
at HttpClient.FactorydesiredCapabilities - take a look
at Capabilitiespublic IOSDriver(org.openqa.selenium.Capabilities desiredCapabilities)
desiredCapabilities - take a look
at Capabilitiespublic void swipe(int startx,
int starty,
int endx,
int endy,
int duration)
TouchShortcutsswipe in interface TouchShortcutsswipe in class AppiumDriver<T extends WebElement>startx - starting x coordinate.starty - starting y coordinate.endx - ending x coordinate.endy - ending y coordinate.duration - amount of time in milliseconds for the entire swipe action to takeTouchShortcuts.swipe(int, int, int, int, int).public void hideKeyboard(String strategy, String keyName)
IOSDeviceActionShortcutshideKeyboard in interface IOSDeviceActionShortcutsstrategy - HideKeyboardStrategy.keyName - 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)
IOSDeviceActionShortcutshideKeyboard in interface IOSDeviceActionShortcutskeyName - The button pressed by the mobile driver to attempt hiding the
keyboard.IOSDeviceActionShortcuts.hideKeyboard(String).public void shake()
IOSDeviceActionShortcutsshake in interface IOSDeviceActionShortcutsIOSDeviceActionShortcuts.shake().public T findElementByIosUIAutomation(String using) throws org.openqa.selenium.WebDriverException
findElementByIosUIAutomation in interface FindsByIosUIAutomation<T extends WebElement>org.openqa.selenium.WebDriverException - This method is not applicable with browser/webview UI.public List<T> findElementsByIosUIAutomation(String using) throws org.openqa.selenium.WebDriverException
findElementsByIosUIAutomation in interface FindsByIosUIAutomation<T extends 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<T extends WebElement>execute in class org.openqa.selenium.remote.RemoteWebDriverpublic T findElement(org.openqa.selenium.By by)
WebDriverWebElement using the given method.
This method is affected by the 'implicit wait' times in force at the time of execution.
The findElement(..) invocation will return a matching row, or try again repeatedly until
the configured timeout is reached.
findElement should not be used to look for non-present elements, use WebDriver.findElements(By)
and assert zero length response instead.
findElement in interface MobileDriver<T extends WebElement>findElement in interface SearchContextfindElement in interface WebDriverfindElement in class org.openqa.selenium.remote.RemoteWebDriverby - The locating mechanismBy,
WebDriver.Timeoutspublic T findElement(String by, String using)
findElement in class org.openqa.selenium.remote.RemoteWebDriverpublic T findElementById(String id)
findElementById in interface MobileDriver<T extends WebElement>findElementById in interface FindsByIdfindElementById in class org.openqa.selenium.remote.RemoteWebDriverpublic T findElementByLinkText(String using) throws org.openqa.selenium.WebDriverException
findElementByLinkText in interface MobileDriver<T extends WebElement>findElementByLinkText in interface FindsByLinkTextfindElementByLinkText in class org.openqa.selenium.remote.RemoteWebDriverorg.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 MobileDriver<T extends WebElement>findElementByPartialLinkText in interface FindsByLinkTextfindElementByPartialLinkText in class org.openqa.selenium.remote.RemoteWebDriverorg.openqa.selenium.WebDriverException - his method doesn't work against native app UI.public T findElementByTagName(String using)
findElementByTagName in interface MobileDriver<T extends WebElement>findElementByTagName in interface FindsByTagNamefindElementByTagName in class org.openqa.selenium.remote.RemoteWebDriverpublic T findElementByName(String using)
findElementByName in interface MobileDriver<T extends WebElement>findElementByName in interface FindsByNamefindElementByName in class org.openqa.selenium.remote.RemoteWebDriverpublic T findElementByClassName(String using)
findElementByClassName in interface MobileDriver<T extends WebElement>findElementByClassName in interface FindsByClassNamefindElementByClassName in class org.openqa.selenium.remote.RemoteWebDriverpublic T findElementByCssSelector(String using) throws org.openqa.selenium.WebDriverException
findElementByCssSelector in interface MobileDriver<T extends WebElement>findElementByCssSelector in interface FindsByCssSelectorfindElementByCssSelector in class org.openqa.selenium.remote.RemoteWebDriverorg.openqa.selenium.WebDriverException - his method doesn't work against native app UI.public T findElementByXPath(String using)
findElementByXPath in interface MobileDriver<T extends WebElement>findElementByXPath in interface FindsByXPathfindElementByXPath in class org.openqa.selenium.remote.RemoteWebDriverpublic T findElementByAccessibilityId(String using) throws org.openqa.selenium.WebDriverException
findElementByAccessibilityId in interface FindsByAccessibilityId<T extends WebElement>org.openqa.selenium.WebDriverException - This method is not applicable with browser/webview UI.@Deprecated public org.openqa.selenium.interactions.Mouse getMouse()
getMouse in interface org.openqa.selenium.interactions.HasInputDevicesgetMouse in class org.openqa.selenium.remote.RemoteWebDriverCopyright © 2016. All rights reserved.