I am testing my Expo (React native) app using Appium and Browser stack, Following is my configuration for BrowserStack and Appium:
// ============
// Specs
// ============
config.specs = [
'./tests/specs/**/app*.spec.ts',
];
config.exclude = [
// Exclude this one because the test can only be executed on emulators/simulators
// './tests/specs/**/app.biometric.login.spec.ts',
];
// =============================
// Browserstack specific config
// =============================
// User configuration
config.user = process.env.BROWSERSTACK_USER || '$BROWSERSTACK_USERNAME';
config.key = process.env.BROWSERSTACK_ACCESS_KEY || '$BROWSERSTACK_ACCESS_KEY';
// Use browserstack service
config.services = ['browserstack'];
// ============
// Capabilities
// ============
// For all capabilities please check
// http://appium.io/docs/en/writing-running-appium/caps/#general-capabilities
config.capabilities = [
{
// Set your BrowserStack config
'browserstack.debug': true,
// Set URL of the application under test
app: process.env.BROWSERSTACK_ANDROID_APP_ID || getBrowserstackAndroidPath,
// Specify device and os_version for testing
device: 'Google Pixel 3',
os_version: '9.0',
// Set other BrowserStack capabilities
project: 'My-app',
build: 'android',
name: 'MyApp'
},
];
exports.config = config;
It is working fine with my local setup using Appium, but while run it in CI script, it gives following error,
invalid argument: Unsupported locator strategy: accessibility id 184 (Session info: chrome=100.0.4896.127) 185 (Driver info: chromedriver=100.0.4896.60 (6a5d10861ce8de5fce22564658033b43cb7de047-refs/branch-heads/4896@{#875}),platform=Linux 4.1.13-101.fc21.x86_64 x86_64)