Why Appium 2.0?
Appium Plugins
W3C
Server Request
Server
Server Request
WDA
LIVE CODING
"dependencies": {
"@appium/base-plugin": "^1.6.4"
},
"appium": {
"pluginName": "<plugin name>",
"mainClass": "<class name>"
},
export default class AppiumPlugin extends BasePlugin {
async createSession(next, driver, jwpDesCaps, jwpReqCaps, caps) {
log.info('Building my new appium plugin');
.....
await next();
}
}
Step 1
Step 2
static newMethodMap = {
'/session/:sessionId/fake_data': {
GET: {command: 'getFakeSessionData'}
},
};
async getFakeSessionData (next, driver) {
await B.delay(1);
return driver.fakeSessionData || null;
}
driver.getFakeData()
Server
Client
appium plugin install --source=local <path to plugin>
appium plugin install --source=npm appium-wait-plugin
appium --plugins=element-wait
Plugin Installation
Plugin Activation