测试积点老人 发表于 2018-4-24 10:48:45

Day3-5测试积点任务

问题:
请教,运行脚本后,出现 Command failed 的错误。
<font face="微软雅黑" size="3">import os
from selenium import webdriver

PATH = lambda p: os.path.abspath(
    os.path.join(os.path.dirname(__file__), p)
)

desired_caps = {}
desired_caps['deviceName'] = '6TZPJZGEAUK7TOWG'
desired_caps['platformName'] = 'Android'
desired_caps['browserName'] = ''
desired_caps['version'] = '4.2'
#desired_caps['app'] = PATH(r'C:\Users\mazhigang\Desktop\AndroidStorm.apk')
desired_caps['appPackage'] = 'com.storm.smart'
desired_caps['appActivity'] = '.LogoActivity'

driver = webdriver.Remote('http://localhost:4723/wd/hub',desired_caps)</font>

上面是代码,就写了这么多,然后python XXX.py运行,appium上报错信息;
<font face="微软雅黑" size="3">
error: Failed to start an Appium session, err was: Error: Command failed:
debug: Error: Command failed:
at ChildProcess.exithandler (child_process.js:637:15)
at ChildProcess.EventEmitter.emit (events.js:98:17)
at maybeClose (child_process.js:743:16)
at Process.ChildProcess._handle.onexit (child_process.js:810:5)
debug: Responding to client with error: {"status":33,"value":{"message":"A new session could not be created. (Original error: Command failed: )","killed":false,"code":1,"signal":null,"origValue":"Command failed: "},"sessionId":null}</font>

不知道这个Command failed是怎么错了。求大神指点。

qqq911 发表于 2018-4-25 10:15:10

session未被正确创建

abcsell 发表于 2018-4-25 10:29:05


session未被正确创建,检查下日志的位置

海海豚 发表于 2018-4-25 11:01:08

用 adb devices -l 看看

jingzizx 发表于 2018-4-25 11:02:51

服务连接有问题
页: [1]
查看完整版本: Day3-5测试积点任务