1. 程式人生 > >appium 自動化測試踩過的坑

appium 自動化測試踩過的坑

ice webdriver could not info fail dev color exe line

appium 常見問題

[appium v1.9.1]問題1:webview 版本號與chromedriver 版本不對應。

WebDriverException: Message: An unknown server-side error occurred while processing the command. Original error: No Chromedriver found that can automate Chrome ‘49.0.2623‘. See https://github.com/appium/appium/blob/master/docs/en/writing-running-appium/web/chromedriver.md

for more details.

[appium v1.9.1]問題2:webview 版本號與chromedriver 版本不對應。

An unknown server-side error occurred while processing the command. Original error: Failed to start Chromedriver session: A new session could not be created. Details: session not created exception

from unknown error: Runtime.executionContextCreated has invalid ‘context‘: {"auxData":{"frameId":"27814.1","isDefault":true},"id":1,"name":"","origin":"://"}

(Session info: chrome=57.0.2987.132)

(Driver info: chromedriver=2.21.371459 (36d3d07f660ff2bc1bf28a75d1cdabed0983e7c4),platform=Windows NT 10.0 x86_64)

解決方法:

根據上面提供的版本號下載對應的chromedriver版本號,存放在Appium\resources\app\node_modules\appium\node_modules\appium-chromedriver\chromedriver\win

位置下,重啟appium工具。

[appium v6.0]問題3:使用driver.context獲取到webview時,顯示[u“WEBVIEW_undefined”]後,報NoSuchContextException 的異常

技術分享圖片

解決方法:在Appium\node_modules\appium\lib\devices\android\android-hybrid.js中,在 pkg = line [pkgColumn]; 前面加上 pkgColumn = line.length - 1;

技術分享圖片

appium 自動化測試踩過的坑