Appium 新手学 appium-appium 错误截图

· 2015年05月20日 · 最后由 luzif 回复于 2016年12月07日 · 3103 次阅读
#appium的错误截图跟webdriver大同小异~
#捕捉百度输入框异常
try:
    driver.find_element_by_id("kwsss").send_keys("selenium")
    driver.find_element_by_id("su1").click()
except:
    driver.get_screenshot_as_file("/home/fnngj/python/error_png.png")
如果觉得我的文章对您有用,请随意打赏。您的支持将鼓励我继续创作!
共收到 4 条回复 时间 点赞
[该话题已被删除] 中提及了此贴 09月15日 15:08

我都装好了,不过运行一个 demo 时报错,appium 报错日志:info: [debug] Responding to client with error: {"status":33,"value":{"message":"A new session could not be created. (Original error: The following desired capabilities are required, but were not provided: platformName, deviceName)","origValue":"The following desired capabilities are required, but were not provided: platformName, deviceName"},"sessionId":null},可是我启动 appium 时是:info: [debug] Non-default server args: {"address":"127.0.0.1","logNoColors":true,"avd":"android4.4.2","deviceName":"Android Emulator","platformName":"Android","platformVersion":"19","automationName":"Appium"},代码如下:capabilities.setCapability("platformName", "Android");
capabilities.setCapability("platformVersion", "19");
capabilities.setCapability("deviceName", "Android Emulator");请问为啥还报那个错误呢?

匿名 #3 · 2016年11月16日

说的很清楚啊"The following desired capabilities are required, but were not provided: platformName, deviceName"导致了"A new session could not be created.

新手学 appium-合集第一季度 中提及了此贴 11月25日 17:29

Encountered internal error running command: Error: targetSdkVersionFromManifest failed. Original error: Cannot read property '1' of null 请问报这个错误,给怎么解决呢?

#5 楼 @chezi1988 https://github.com/appium/appium/issues/7353 这里有解决方案,我 win7 下通过 npm install -g appium-adb@2.7.0 解决

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