Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Selenium Window 连接Chrome失败 #1093

Open
devh0407 opened this issue Apr 10, 2023 · 4 comments
Open

Selenium Window 连接Chrome失败 #1093

devh0407 opened this issue Apr 10, 2023 · 4 comments

Comments

@devh0407
Copy link

💡相关项目: 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的代码:

无需代码
@xbingo2
Copy link

xbingo2 commented Apr 13, 2023

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

@226219076
Copy link

我也报这个错

@devh0407
Copy link
Author

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

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

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

@devh0407
Copy link
Author

devh0407 commented Apr 27, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants