From 7e8751109efde666008929a7398e569c0ff05cb6 Mon Sep 17 00:00:00 2001 From: Scott Dixon Date: Mon, 12 Oct 2015 12:05:15 -0700 Subject: [PATCH] Initial readme --- README.md | 126 +++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 124 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 87692dcb..ae573126 100644 --- a/README.md +++ b/README.md @@ -6,10 +6,132 @@ [![Build Status](https://travis-ci.org/appium/appium-android-driver.svg?branch=master)](https://travis-ci.org/appium/appium-android-driver) [![Coverage Status](https://coveralls.io/repos/appium/appium-android-driver/badge.svg?branch=master)](https://coveralls.io/r/appium/appium-android-driver?branch=master) -appium-android-driver +Appium Android Driver =================== -Work in progress, stay tuned! +Appium Android Driver is a test automation tool for Android devices. Appium Android Driver automates native, hybrid and mobile web apps, tested on simulators, emulators and real devices. Appium Android Driver is part of the [Appium](https://github.com/appium/appium) mobile test automation tool. + +## Installation +``` +npm install appium-android-driver +``` + +## Usage +Import Android Driver, set [desired capabilities](http://appium.io/slate/en/1.5/?javascript#appium-server-capabilities) and create a session: + +``` +import { AndroidDriver } from `appium-android-driver` + +let defaultCaps = { + app: 'path/to/your.apk', + deviceName: 'Android', + platformName: 'Android' +}; + +await driver.createSession(defaultCaps); +``` +Run commands: +``` +await driver.setOrientation('LANDSCAPE'); +console.log(await driver.getOrientation()); // -> 'LANDSCAPE' +``` + +## Commands +| Command | +|----------------------------| +| `activateIMEEngine` | +| `availableIMEEngines` | +| `back` | +| `background` | +| `clear` | +| `click` | +| `complexTap` | +| `deactivateIMEEngine` | +| `defaultContextName` | +| `defaultWebviewName` | +| `doKey` | +| `doTouchAction` | +| `doTouchDrag` | +| `drag` | +| `elementDisplayed` | +| `elementEnabled` | +| `elementSelected` | +| `fakeFlick` | +| `fakeFlickElement` | +| `findElOrEls` | +| `fixRelease` | +| `flick` | +| `getActiveIMEEngine` | +| `getAlertText` | +| `getAttribute` | +| `getContexts` | +| `getCurrentActivity` | +| `getCurrentContext` | +| `getLocationInView` | +| `getLog` | +| `getLogTypes` | +| `getName` | +| `getNetworkConnection` | +| `getOrientation` | +| `getPageSource` | +| `getScreenshot` | +| `getSize` | +| `getStrings` | +| `getText` | +| `getWindowSize` | +| `hideKeyboard` | +| `installApp` | +| `isAppInstalled` | +| `isIMEActivated` | +| `isLocked` | +| `isWebContext` | +| `keyevent` | +| `keys` | +| `lock` | +| `longPressKeyCode` | +| `onChromedriverStop` | +| `openNotifications` | +| `openSettingsActivity` | +| `parseTouch` | +| `performGesture` | +| `performMultiAction` | +| `performTouch` | +| `pinchClose` | +| `pinchOpen` | +| `postAcceptAlert` | +| `postDismissAlert` | +| `pressKeyCode` | +| `pullFile` | +| `pullFolder` | +| `pushFile` | +| `removeApp` | +| `replaceValue` | +| `reset` | +| `setAlertText` | +| `setContext` | +| `setGeoLocation` | +| `setLocation` | +| `setNetworkConnection` | +| `setOrientation` | +| `setValue` | +| `startActivity` | +| `startChromedriverProxy` | +| `stopChromedriverProxies` | +| `suspendChromedriverProxy` | +| `swipe` | +| `tap` | +| `toggleData` | +| `toggleFlightMode` | +| `toggleLocationServices` | +| `toggleSetting` | +| `toggleWiFi` | +| `touchDown` | +| `touchLongClick` | +| `touchMove` | +| `touchUp` | +| `unlock` | +| `wrapBootstrapDisconnect` | + ## Watch