2015년 1월 6일 화요일

[已解决]context到webview的时候报错。 Chromedriver create session did not work.

在模拟器使用#appium时, 用context()切换webview时会报chromedriver的问题。 折磨我好久。log如下。

error: Chromedriver create session did not work. Status was 200 and body was{"sessionId":"276ad6edf24e1798bd79b4e5aabfc1bc","status":13,"value":{"message":"unknown error: Chrome version must be >= 33.0.1750.0\n  (Driver info: chromedriver=2.10.267521,platform=Windows NT 6.1 SP1 x86_64)"}}
info: [debug] Responding to client with error: {"status":13,"value":{"message":"An unknown server-side error occurred while processing the command. (Original error: Did not get session redirect from Chromedriver)","origValue":"Did not get session redirect from Chromedriver"},"sessionId":"f8d68152-f368-47a4-9a3d-8c66af8b84e4"}
这是chromedriver版本问题。最新的chromedriver2.13可以解决。
下载2.13版本替换掉原来的就ok。在模拟器正常切换webview并正常运行webview里的各种操作。

chromedriver路径:

Windows:C:\Users\***\AppData\Roaming\npm\node_modules\appium\build\chromedriver\windows

MAC:
/usr/local/lib/node_modules/appium/build/chromedriver/mac/chromedriver

/usr/local/lib/node_modules/appium/node_modules/appium-chromedriver/chromedriver/mac

这个问题解决了,但是切换webview还有个问题,就是在真机上无法识别webview。郁闷。这个慢慢研究吧。(这个问题已经解决,play store上的app无法识别webview。必须得是开发人员build的app。)



댓글 없음:

댓글 쓰기