I am using Appium + WebDriverIO to run E2E tests for a React Native app.
When I run the tests on iOS, it will automatically launch the specified iOS simulator, but for Android I have to manually launch the emulator before running the tests.
I am running the following command:
npx wdio run wdio.conf.js
My wdio.conf.js
looks like this:
export const config = {
capabilities: [
// Android
{
platformName: "Android",
app: "./path/to/apk/app-debug.apk",
deviceName: "Pixel_4_API_30",
platformVersion: "11.0",
},
// iOS
{
platformName: "iOS",
automationName: "XCUITest",
deviceName: "iPhone 11",
platformVersion: "13.5",
app: "./path/to/app/My App Name.app",
},
],
// ...
};
The deviceName
(Pixel_4_API_30
) is taken from the output of running emulator -list-avds
.
I am running on MacOS.
How can I make the Android emulator launch automatically?