|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.openqa.selenium.remote.RemoteWebDriver
io.appium.java_client.AppiumDriver
public class AppiumDriver
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.openqa.selenium.remote.RemoteWebDriver |
|---|
org.openqa.selenium.remote.RemoteWebDriver.RemoteTargetLocator, org.openqa.selenium.remote.RemoteWebDriver.RemoteWebDriverOptions, org.openqa.selenium.remote.RemoteWebDriver.When |
| Nested classes/interfaces inherited from interface org.openqa.selenium.WebDriver |
|---|
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 |
| Constructor Summary | |
|---|---|
AppiumDriver(URL remoteAddress,
org.openqa.selenium.Capabilities desiredCapabilities)
|
|
| Method Summary | |
|---|---|
void |
closeApp()
Close the app which was provided in the capabilities at session creation |
String |
complexFind(String[] complex)
|
org.openqa.selenium.WebDriver |
context(String name)
|
String |
currentActivity()
Get the current activity being run on the mobile device |
void |
endTestCoverage(String intent,
String path)
Get test-coverage data Android-only method |
protected org.openqa.selenium.remote.Response |
execute(String command)
|
org.openqa.selenium.remote.Response |
execute(String driverCommand,
Map<String,?> parameters)
|
org.openqa.selenium.WebElement |
findElementByAccessibilityId(String using)
|
org.openqa.selenium.WebElement |
findElementByAndroidUIAutomator(String using)
|
org.openqa.selenium.WebElement |
findElementByIosUIAutomation(String using)
|
List<org.openqa.selenium.WebElement> |
findElementsByAccessibilityId(String using)
|
List<org.openqa.selenium.WebElement> |
findElementsByAndroidUIAutomator(String using)
|
List<org.openqa.selenium.WebElement> |
findElementsByIosUIAutomation(String using)
|
String |
getAppStrings()
Get all defined Strings from an Android app |
String |
getContext()
|
Set<String> |
getContextHandles()
|
org.openqa.selenium.WebElement |
getNamedTextField(String name)
In iOS apps, named TextFields have the same accessibility Id as their containing TableElement. |
void |
hideKeyboard()
Hides the keyboard if it is showing. |
void |
hideKeyboard(String keyName)
Hides the keyboard by pressing the button specified by keyName if it is showing. |
void |
installApp(String appPath)
Install an app on the mobile device |
boolean |
isAppInstalled(String bundleId)
Checks if an app is installed on the device |
void |
launchApp()
Launch the app which was provided in the capabilities at session creation |
void |
lockScreen(int seconds)
Lock the device (bring it to the lock screen) for a given number of seconds |
void |
performMultiTouchAction(MultiTouchAction multiAction)
Performs multiple TouchAction gestures at the same time, to simulate multiple fingers/touch inputs. |
TouchAction |
performTouchAction(TouchAction touchAction)
Performs a chain of touch actions, which together can be considered an entire gesture. |
void |
pinch(int x,
int y)
Convenience method for pinching an element on the screen. |
void |
pinch(org.openqa.selenium.WebElement el)
Convenience method for pinching an element on the screen. |
byte[] |
pullFile(String remotePath)
|
void |
pushFile(String remotePath,
byte[] base64Data)
Save base64 encoded data as a file on the remote mobile device. |
void |
removeApp(String bundleId)
Remove the specified app from the device (uninstall) |
void |
resetApp()
Reset the currently running app for this session |
void |
runAppInBackground(int seconds)
Runs the current app as a background app for the number of seconds requested. |
void |
sendKeyEvent(int key)
Send a key event to the device |
void |
sendKeyEvent(int key,
Integer metastate)
Send a key event along with an Android metastate to an Android device Metastates are things like *shift* to get uppercase characters |
void |
shake()
Simulate shaking the device This is an iOS-only method |
void |
swipe(int startx,
int starty,
int endx,
int endy,
int duration)
Convenience method for swiping across the screen |
void |
tap(int fingers,
int x,
int y,
int duration)
Convenience method for tapping a position on the screen |
void |
tap(int fingers,
org.openqa.selenium.WebElement element,
int duration)
Convenience method for tapping the center of an element on the screen |
void |
zoom(int x,
int y)
Convenience method for "zooming in" on an element on the screen. |
void |
zoom(org.openqa.selenium.WebElement el)
Convenience method for "zooming in" on an element on the screen. |
| Methods inherited from class org.openqa.selenium.remote.RemoteWebDriver |
|---|
close, executeAsyncScript, executeScript, findElement, findElement, findElementByClassName, findElementByCssSelector, findElementById, findElementByLinkText, findElementByName, findElementByPartialLinkText, findElementByTagName, findElementByXPath, findElements, findElements, findElementsByClassName, findElementsByCssSelector, findElementsById, findElementsByLinkText, findElementsByName, findElementsByPartialLinkText, findElementsByTagName, findElementsByXPath, get, getCapabilities, getCommandExecutor, getCurrentUrl, getElementConverter, getErrorHandler, getExecuteMethod, getFileDetector, getKeyboard, getMouse, getPageSource, getRemoteStatus, getScreenshotAs, getSessionId, getTitle, getWindowHandle, getWindowHandles, log, manage, navigate, quit, setCommandExecutor, setElementConverter, setFileDetector, setFoundBy, setLogLevel, setSessionId, startClient, startSession, startSession, stopClient, switchTo, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.openqa.selenium.WebDriver |
|---|
close, findElement, findElements, get, getCurrentUrl, getPageSource, getTitle, getWindowHandle, getWindowHandles, manage, navigate, quit, switchTo |
| Constructor Detail |
|---|
public AppiumDriver(URL remoteAddress,
org.openqa.selenium.Capabilities desiredCapabilities)
| Method Detail |
|---|
public org.openqa.selenium.remote.Response execute(String driverCommand,
Map<String,?> parameters)
execute in interface MobileDriverexecute in class org.openqa.selenium.remote.RemoteWebDriverprotected org.openqa.selenium.remote.Response execute(String command)
execute in class org.openqa.selenium.remote.RemoteWebDriverpublic void resetApp()
public String getAppStrings()
public void sendKeyEvent(int key)
key - code for the key pressed on the device
public void sendKeyEvent(int key,
Integer metastate)
key - code for the key pressed on the Android devicemetastate - metastate for the keypresspublic String currentActivity()
public byte[] pullFile(String remotePath)
remotePath - On Android and iOS, this is either the path to the file (relative to the root of the app's file system).
On iOS only, if path starts with /AppName.app, which will be replaced with the application's .app directory
public void pushFile(String remotePath,
byte[] base64Data)
remotePath - Path to file to write data to on remote devicebase64Data - Base64 encoded byte array of data to write to remote devicepublic void hideKeyboard()
public void hideKeyboard(String keyName)
keyName - The button pressed by the mobile driver to attempt hiding the keyboardpublic void runAppInBackground(int seconds)
seconds - Number of seconds to run App in backgroundpublic TouchAction performTouchAction(TouchAction touchAction)
performTouchAction in interface MobileDrivertouchAction - A TouchAction object, which contains a list of individual touch actions to perform
public void performMultiTouchAction(MultiTouchAction multiAction)
performMultiTouchAction in interface MobileDrivermultiAction - the MultiTouchAction object to perform.
public void tap(int fingers,
org.openqa.selenium.WebElement element,
int duration)
fingers - number of fingers/appendages to tap withelement - element to tapduration - how long between pressing down, and lifting fingers/appendages
public void tap(int fingers,
int x,
int y,
int duration)
fingers - number of fingers/appendages to tap withx - x coordinatey - y coordinateduration -
public void swipe(int startx,
int starty,
int endx,
int endy,
int duration)
startx - starting x coordinatestarty - starting y coordinateendx - ending x coordinateendy - ending y coordinateduration - amount of time in milliseconds for the entire swipe action to takepublic void pinch(org.openqa.selenium.WebElement el)
el - The element to pinch
public void pinch(int x,
int y)
x - x coordinate to terminate the pinch ony - y coordinate to terminate the pinch onpublic void zoom(org.openqa.selenium.WebElement el)
el - The element to pinch
public void zoom(int x,
int y)
x - x coordinate to start zoom ony - y coordinate to start zoom onpublic org.openqa.selenium.WebElement getNamedTextField(String name)
name - accessiblity id of TextField
public boolean isAppInstalled(String bundleId)
bundleId - bundleId of the app
public void installApp(String appPath)
appPath - path to app to installpublic void removeApp(String bundleId)
bundleId - the bunble identifier (or app id) of the app to removepublic void launchApp()
public void closeApp()
public void endTestCoverage(String intent,
String path)
intent - intent to broadcastpath - path to .ec filepublic void lockScreen(int seconds)
seconds - number of seconds to lock the screen forpublic void shake()
public String complexFind(String[] complex)
public org.openqa.selenium.WebDriver context(String name)
context in interface org.openqa.selenium.ContextAwarepublic Set<String> getContextHandles()
getContextHandles in interface org.openqa.selenium.ContextAwarepublic String getContext()
getContext in interface org.openqa.selenium.ContextAwarepublic org.openqa.selenium.WebElement findElementByIosUIAutomation(String using)
findElementByIosUIAutomation in interface FindsByIosUIAutomationpublic List<org.openqa.selenium.WebElement> findElementsByIosUIAutomation(String using)
findElementsByIosUIAutomation in interface FindsByIosUIAutomationpublic org.openqa.selenium.WebElement findElementByAndroidUIAutomator(String using)
findElementByAndroidUIAutomator in interface FindsByAndroidUIAutomatorpublic List<org.openqa.selenium.WebElement> findElementsByAndroidUIAutomator(String using)
findElementsByAndroidUIAutomator in interface FindsByAndroidUIAutomatorpublic org.openqa.selenium.WebElement findElementByAccessibilityId(String using)
findElementByAccessibilityId in interface FindsByAccessibilityIdpublic List<org.openqa.selenium.WebElement> findElementsByAccessibilityId(String using)
findElementsByAccessibilityId in interface FindsByAccessibilityId
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||