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是怎么错了。求大神指点。
session未被正确创建
session未被正确创建,检查下日志的位置 用 adb devices -l 看看 服务连接有问题
页:
[1]