WebDriverIO连接到Appium未找到匹配功能错误

Prince0813 测试交流2145字数 740阅读模式
摘要我正试图通过Appium将我的虚拟安卓设备连接到我的Webdriverio脚本,以自动化一些测试。 我的能力设置如下: 功能:[{ //您需要的默认值。。。

我正试图通过Appium将我的虚拟安卓设备连接到我的Webdriverio脚本,以自动化一些测试。

我的能力设置如下:文章源自玩技e族-https://www.playezu.com/180045.html

capabilities: [{
    // The defaults you need to have in your config
    platformName: 'Android',
    browserName: 'chrome',
    maxInstances: 1,
    // For W3C the appium capabilities need to have an extension prefix
    // http://appium.io/docs/en/writing-running-appium/caps/
    // This is `appium:` for all Appium Capabilities which can be found here
    'appium:automationName': 'uiautomator2',
    'appium:platformVersion': '12.0',
    'appium:deviceName': 'emulator-5554',
    'appium:noReset': 'true'
}],

我运行chromedriver和Appium服务:文章源自玩技e族-https://www.playezu.com/180045.html

services: ['appium', 'chromedriver']

但是,当我尝试运行脚本时,我不断出现以下错误:文章源自玩技e族-https://www.playezu.com/180045.html

ERROR webdriver: Request failed with status 500 due to session not created: session not created: No matching capabilities found

我已经试着改变能力。更改设备名称以匹配另一个正在运行的设备。我还尝试删除appium前缀,只写功能名称,但这会导致进一步的错误。文章源自玩技e族-https://www.playezu.com/180045.html

任何帮助都将不胜感激。文章源自玩技e族-https://www.playezu.com/180045.html 文章源自玩技e族-https://www.playezu.com/180045.html

玩技站长微信
添加好友自动发送入群邀请
weinxin
rainbow-shownow
玩技官方公众号
官方微信公众号
weinxin
PLAYEZU
 
  • 版权提示:本站仅供存储任何法律责任由作者承担▷诈骗举报◁▷新闻不符◁▷我要投稿◁
    风险通知:非原创文章均为网络投稿真实性无法判断,侵权联系2523030730
    免责声明:内容来自用户上传发布或新闻客户端自媒体,切勿!切勿!切勿!添加联系方式以免受骗。
  • 原创转载:https://www.playezu.com/180045.html
    转载说明: 点我前往阅读>>>
评论  2  访客  2
    • Ramkumar
      Ramkumar 9

      如果您正在使用安装在移动设备中的应用程序进行测试,请同时使用appium:appPackage和appium:appActivity属性。下面是打开wdio的示例。演示应用程序。
      capabilities: [{
      "platformName": "Android",
      "appium:udid": "emulator-5554",
      "appium:automationName": "UiAutomator2",
      "appium:appPackage": "io.appium.android.apis",
      "appium:appActivity": ".ApiDemos",
      "appium:platformVersion": "11"
      }]

      此外,您可能需要wdio中的以下详细信息。conf.js文件,
      services: [
      [‘appium’, {
      args: {
      address: ‘localhost’,
      port: 4723
      },
      logPath:’./’,
      }]
      ],

      • Rohit
        Rohit 9

        您好,我认为您缺少其中一个功能,下面是appium desktop中使用的功能,它确实对我有效,即“chromedriverExecutableDir”,它为chrome驱动程序可执行文件夹提供了绝对路径。还要确保您在模拟器中检查了chrome版本,并相应地使用它。
        "platformName": "Android",
        "platformVersion": "11",
        "automationName": "UiAutomator2",
        "deviceName": "Pixel5",
        "browserName": "chrome",
        "chromedriverExecutableDir": "C:absolutepathtochromedriver"

        Appium文档截图和参考链接如下
        https://appium.io/docs/en/writing-running-appium/caps/

        这是如何在模拟器中检查chrome驱动程序版本

        请参阅下面的屏幕,从appium桌面应用程序测试您的功能。

      匿名

      发表评论

      匿名网友
      确定