Appium 要获取 webview 页面 handle 报错:Original error: 404 - "unknown command: session/f9dc30098067a7aa5fc5c34eda847e42/window/handles

Tina · 2018年08月21日 · 最后由 Tina 回复于 2018年08月23日 · 1419 次阅读

Traceback (most recent call last):
File "Test001_RefuseSaleManagerRegister.py", line 27, in testRefuseRegisterApplication
print(self.appium_driver.window_handles)
File "D:\software\python\3.6.6\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 723, in window_handles
return self.execute(Command.W3C_GET_WINDOW_HANDLES)['value']
File "D:\software\python\3.6.6\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 320, in execute
self.error_handler.check_response(response)
File "D:\software\python\3.6.6\lib\site-packages\appium\webdriver\errorhandler.py", line 29, in check_response
raise wde
File "D:\software\python\3.6.6\lib\site-packages\appium\webdriver\errorhandler.py", line 24, in check_response
super(MobileErrorHandler, self).check_response(response)
File "D:\software\python\3.6.6\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: An unknown server-side error occurred while processing the command. Original error: Could not proxy. Proxy error: Could not proxy command to remote server. Original error: 404 - "unknown command: session/f9dc30098067a7aa5fc5c34eda847e42/window/handles"

appium server:1.8.1
python:3.6.6

之前没有问题,是 Python3.6.4,不知道版本有影响没

共收到 3 条回复 时间 点赞

webview 有 handles 这个概念吗,不都是直接获取 context,然后 switch 进去呀

Tina #2 · 2018年08月23日 Author
雨夜狂奔 回复

是的,有的 webview 页面有多个 handle,需要切换后才能定位到

Tina #3 · 2018年08月23日 Author

已经确认了是 0.28 版本的 Bug,我用了以前的版本可以的

恒温 关闭了讨论 08月23日 13:37
需要 登录 後方可回應,如果你還沒有帳號按這裡 注册