Skip to content

Commit 6be4e0c

Browse files
authored
Merge pull request #148 from synonymdev/test/android-emulator-config-env
test: parameterize android emulator config
2 parents 7bf845e + 2404c18 commit 6be4e0c

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

wdio.conf.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ import fs from 'node:fs';
44
import { grantIOSCameraPermission } from './test/helpers/setup';
55

66
const isAndroid = process.env.PLATFORM === 'android';
7+
const androidUdid = process.env.ANDROID_UDID;
8+
const androidDeviceName = process.env.ANDROID_DEVICE_NAME || 'Pixel_6';
9+
const androidPlatformVersion = process.env.ANDROID_PLATFORM_VERSION || '13.0';
710
const iosDeviceName = process.env.SIMULATOR_NAME || 'iPhone 17';
811
const iosPlatformVersion = process.env.SIMULATOR_OS_VERSION || '26.0.1';
912

@@ -71,8 +74,9 @@ export const config: WebdriverIO.Config = {
7174
? {
7275
platformName: 'Android',
7376
'appium:automationName': 'UiAutomator2',
74-
'appium:deviceName': 'Pixel_6',
75-
'appium:platformVersion': '13.0',
77+
...(androidUdid ? { 'appium:udid': androidUdid } : {}),
78+
'appium:deviceName': androidDeviceName,
79+
'appium:platformVersion': androidPlatformVersion,
7680
'appium:app': androidApp,
7781
'appium:autoGrantPermissions': true,
7882
// 'appium:waitForIdleTimeout': 1000,

0 commit comments

Comments
 (0)