AirtestIDE icon indicating copy to clipboard operation
AirtestIDE copied to clipboard

Selenium Window 连接Chrome失败

Open devh0407 opened this issue 1 year ago • 4 comments

:bulb:相关项目: AirtestIDE

标题: [BUG提交]Selenium Window 连接Chrome失败

AirtestIDE版本: 1.2.15

未使用本地Pyhton环境运行脚本

报错描述:     通过点击selenium window窗口内的 获取页面网址, 抛出异常, 怀疑是连接chrome失败 注: 使用了官网提供的chromedriver 最新版本替换了IDE安装目录下的版本

相关截图:

报错Log:

Info: filter not set, use raven.filter.FullPassFilter instead.
loading config from : C:\Users\devh\AppData\Local\AirtestIDE\AirtestIDE\user.json
try loading plugin: firebase_plugin
plugin loaded: firebase_plugin
try loading plugin: headspin_plugin
plugin loaded: headspin_plugin
try loading plugin: selenium_plugin
plugin loaded: selenium_plugin
[19:18:22][DEBUG]<airtest.core.android.adb> D:\soft\AirtestIDE-win-1.2.14\AirtestIDE\airtest\core\android\static\adb\windows\adb.exe devices
['chrome.exe', '--remote-debugging-port=9222', '--user-data-dir=C:\\Users\\devh\\AppData\\Local\\Temp\\AirtestIDE\\selenium_user_data']
queue size is: 10
Traceback (most recent call last):
  File "plugins/selenium_plugin\selenium_wnd.py", line 217, in startWebSlot
  File "plugins/selenium_plugin\selenium_assistant.py", line 68, in get_web_addr
  File "site-packages\pychrome\tab.py", line 206, in start
  File "site-packages\websocket\_core.py", line 606, in create_connection
  File "site-packages\websocket\_core.py", line 253, in connect
  File "site-packages\websocket\_handshake.py", line 57, in handshake
  File "site-packages\websocket\_handshake.py", line 148, in _get_resp_headers
websocket._exceptions.WebSocketBadStatusException: Handshake status 403 Forbidden
Sentry responded with an error
tab init failed!
change inspect type... click

连接设备信息:

提供最小可复现此BUG的代码:

无需代码

devh0407 avatar Apr 10 '23 11:04 devh0407

@devh0407 搞定了吗?我也报这个错

xbingo2 avatar Apr 13 '23 09:04 xbingo2

我也报这个错

226219076 avatar Apr 14 '23 02:04 226219076

@devh0407 搞定了吗?我也报这个错

@xbingo2 @226219076 这个是因为airtest封装的pychrome版本不能在111+的chrome用, 我把我chrome的版本换成了和文档中的版本相近的76.0.3809.12 就可以使用

具体pychrome的问题可以看 Changed GET to PUT for new_tab

devh0407 avatar Apr 27 '23 03:04 devh0407

希望官方大大时间允许的话, 对pychrome的问题做一下兼容 , 感激不尽 @brantxiong @Meteorix , 感激不尽

devh0407 avatar Apr 27 '23 03:04 devh0407