我正在使用Appium和浏览器堆栈测试我的Expo(React native)应用程序,
以下是我对BrowserStack和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;
它在使用Appium的本地设置中运行良好,但在CI脚本中运行时,会出现以下错误:,文章源自玩技e族-https://www.playezu.com/195983.html
无效参数:不支持的定位器策略:可访问性id
184(会话信息:chrome=100.0.4896.127)
185(驱动程序信息:chromedriver=100.0.4896.60(6a5d10861ce8de5fce22564658033b43cb7de047参考/分支头/4896@{875}),平台=Linux 4.1.13-101.fc21.x86_64 x86_ 64)文章源自玩技e族-https://www.playezu.com/195983.html
软件功能测试文档文章源自玩技e族-https://www.playezu.com/195983.html 文章源自玩技e族-https://www.playezu.com/195983.html