Last active
April 17, 2018 10:56
-
-
Save mitchwongho/30400e72fbe09ce0d52289c1164ebde0 to your computer and use it in GitHub Desktop.
Appium Android Basic session script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const wdio = require('webdriverio'); | |
// Driver options | |
const opts = { | |
port: 4723, | |
desiredCapabilities: { | |
platformName: "Android", | |
platformVersion: "8.0", | |
deviceName: "Nexus 5X API 26", | |
app: "ApiDemos-debug.apk", | |
appPackage: "io.appium.android.apis", | |
appActivity: "", | |
automationName: "UiAutomator2" | |
} | |
}; | |
// load the driver with capabilities | |
const client = wdio.remote(opts); | |
// | |
// invoke some Appium commands | |
client | |
.init() | |
.click("~App") | |
.click("~Alert Dialogs") | |
.back() | |
.back() | |
.end(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment