Appium 困惑好几天的问题:error: Failed to start an Appium session, err was: Error: The following desired capabilities are required, but were not provided: platformName 怎么就解决啊!!!

lijiarui · 2014年07月10日 · 最后由 55hhy 回复于 2015年07月07日 · 2356 次阅读

使用的是 appium-1.2 的在运行脚本的时候报这个错:error: Failed to start an Appium session, err was: Error: The following desired capabilities are required, but were not provided: platformName;具体如下:
求大神解答!!!!!

共收到 4 条回复 时间 点赞

把原来的
desired_caps['device'] = 'Android'
改成
desired_caps['platformName'] = 'Android'
具体的看 appium 更新文档

应该从 1.0 就改了

我也遇到了这个问题:

info: --> POST /wd/hub/session {"desiredCapabilities":{"platformName":"Android","deviceName":"Genymotion","appPackage":"Package_name","appActivity":"Activity_name","app":"apk_path"}}
info: Client User-Agent string: appium/ruby_lib/7.0.0
error: Trying to run a session for device 'android' but that device hasn't been configured. Run config

我已经改成了 platformName 了,还有哪里有问题?Appium 是 1.2.0

#3 楼 @55hhy
error: Trying to run a session for device 'android' but that device hasn't been configured. Run config

你的 appium 安装方式不对,有些配置没配好。

需要 登录 后方可回复, 如果你还没有账号请点击这里 注册