react-native - 无法让 Appium 与 Expo 在设备或模拟器上运行(这甚至可能吗?)
问题描述
我无法让 Appium 在本地与 Expo 合作。我在网上找到了几个来源告诉我这应该以某种方式工作,但没有人解释如何。当我使用我的配置启动 webdriverio 时,出现以下错误:
ERROR @wdio/local-runner: Failed launching test session: TypeError: Cannot read property 'capabilities' of null at Runner.run
appium-doctor 告诉我一切都很好,android 模拟器和通过桌面应用程序运行的 appium 服务器正在运行,这是我的 wdio.conf.js:
runner: 'local',
port: 4723,
path: '/',
specs: ['./tests/*.js'],
exclude: [
],
maxInstances: 10,
capabilities: [
{
automationName: 'UiAutomator2',
deviceName: 'Pixel_3a_XL_API_28', // This is name of your Simulator
platformName: 'Android',
platformVersion: '9.0', // Android version of Simulator
orientation: 'PORTRAIT',
maxInstances: 1,
app: 'appiumtest',
// absolute path to the apk goes here ^, I'm keeping it at
// root directory of this test project.
noReset: true,
newCommandTimeout: 240,
},
],
logLevel: 'info',
bail: 0,
baseUrl: 'http://localhost',
waitforTimeout: 10000,
connectionRetryTimeout: 90000,
connectionRetryCount: 3,
services: ['chromedriver', 'appium'],
appium: {
},
framework: 'jasmine',
reporters: ['spec'],
jasmineNodeOpts: {
defaultTimeoutInterval: 60000,
expectationResultHandler: function(passed, assertion) {
},
},
};
``
解决方案
推荐阅读
- java - Java TCP 套接字读取不正确
- javascript - 在 Typescript 中使用类创建对象数组
- python - PySimpleGUI 到 android 或到 exe
- java - 使用 Spring Boot 和 STOMP 时,有没有办法让队列不删除消息?
- c++ - 如何将第三方库集成到便携式自定义库中
- python - 有没有办法将本地烧瓶 http 请求转换为函数调用?
- c++ - Python和C++之间如何相互调用
- python-3.x - 例如获取当前公会ID
- reactjs - 如何使用这些代码将数据放入 MuiDataTable 中?
- google-sheets - SyntaxError:意外的令牌 - Google 表格脚本编辑器