Skip to content

Instantly share code, notes, and snippets.

@mitchwongho
Last active April 17, 2018 10:56
Show Gist options
  • Save mitchwongho/30400e72fbe09ce0d52289c1164ebde0 to your computer and use it in GitHub Desktop.
Save mitchwongho/30400e72fbe09ce0d52289c1164ebde0 to your computer and use it in GitHub Desktop.
Appium Android Basic session script
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