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 grid v4后,无法上传图片 #41

Open
amosnothing opened this issue Sep 21, 2022 · 3 comments
Open

升级到selenium grid v4后,无法上传图片 #41

amosnothing opened this issue Sep 21, 2022 · 3 comments

Comments

@amosnothing
Copy link

selenium grid v3,上传图片正常

@amosnothing
Copy link
Author

问题已经解决,以供给其他人参考,

v4 不可以的原因是因为,向 selenium 发起 /:session/file 请求后,没有返回 status 字段,导致 webdriver 误认为是异常

@SamChan1204
Copy link

@amosnothing 老哥,最后怎么解决的啊?降级回去v3吗?

@amosnothing
Copy link
Author

@amosnothing 老哥,最后怎么解决的啊?降级回去v3吗?

lib 目录中的 jwebdriver.js 文件 224 行修改一下 :

if (response.statusCode !== 200 || (wdStatus !== 0 && apiPath.indexOf("/file") === -1)) {

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

2 participants