连接到Appium的WebDriverio没有发现错误
我正在尝试通过Appium将虚拟Android设备连接到我的WebDriverio脚本,以自动进行一些测试。
我的功能设置为这样:
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 Services:
services: ['appium', 'chromedriver']
但是,当我尝试运行脚本时,我会继续遇到此错误:
ERROR webdriver: Request failed with status 500 due to session not created: session not created: No matching capabilities found
我尝试更改功能。更改设备名称以匹配另一个运行设备。我还尝试删除Appium前缀并写下功能名称,但是这会导致更多错误。
任何帮助将不胜感激。
I'm trying to connect my virtual Android Device via Appium to my Webdriverio script to automate some testing.
I have the capabilities set as this:
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'
}],
And I have the chromedriver and Appium services running:
services: ['appium', 'chromedriver']
But when I try to run my script I keep getting this error:
ERROR webdriver: Request failed with status 500 due to session not created: session not created: No matching capabilities found
I've tried to change up the capabilities. Changing the device name to match another running device. I've also tried to remove the appium prefix and just write the capability name, however that leads to even further errors.
Any help would be appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
嗨,我认为您缺少其中一个功能,以下是Appium Desktop中使用的功能,它确实对我有用,那是“ Chromedriverexecutabledir”,它为Chrome驱动程序可执行文件夹带来了绝对的路径。另外,请确保检查模拟器中的Chrome版本并相应地使用。
Appium文档屏幕截图和相同的参考链接如下


https://appium.io/docs/docs/en/writing-riting-riging-riging-rinning-rinning-runnning-running-appium /caps/
这是如何检查模拟器中的Chrome驱动程序版本
请参阅下面的屏幕,以测试Appium Desktop应用程序的功能。

Hi I think you are missing on one of the capabilities, below is the capability that is used from appium desktop and it did work for me, that was 'chromedriverExecutableDir' that takes the absolute path for the chrome driver executable folder. also make sure you check the chrome version in the simulator and use it accordingly.
Appium document screenshot and reference link for the same is as below


https://appium.io/docs/en/writing-running-appium/caps/
This is how to check the chrome driver version in the simulator
Refer to the below screen for testing your capabilities from the appium desktop application.

如果您使用的是在移动设备中安装的应用程序进行测试,请使用Appium:AppPackage和Appium:Appactivity属性。以下是打开wdio.demo应用程序的示例。
另外,您可能需要WDIO.CONF.JS文件中的以下详细信息,
If you are using a app installed in the mobile device for testing, use appium:appPackage and appium:appActivity property also. Below is a example for opening the wdio.demo app.
Also, you might need the following details in wdio.conf.js file,