Setup project
mkdir your_folder
cd your_folder
npm init -y
npm i @wdio/cli appium@next ts-node typescript
npx wdio config
npx appium driver install uiautomator2Configure wdio.conf.js
const path = require('path')
exports.config = {
// ... another code ...
port: 4723,
specs: ['./test/specs/**/*.js'],
capabilities: [{
platformName: 'Android',
'appium:deviceName': 'your_device_name',
'appium:automationName': 'UiAutomator2',
'appium:app': path.join(process.cwd(), './your/application/location/app.apk')
}],
services: ['appium'],
// ... another code ...
}Check prerequisites
npm i -g appium-doctor
appium-doctorCreate sample test in ./test/specs/sample.js
describe('test wrapper', () => {
it('test title', () => {
expect(1).toBe(1)
})
})Open your emulator/device and Run the test
npx wdio