首页 > 解决方案 > 无法让 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) {

    },
  },


};
``

标签: react-nativetddappiumexpo

解决方案


推荐阅读