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

chrome版本更新出现兼容性问题导致失效,使用webdriver自动下载版本一劳永逸 #40

Closed
wants to merge 2 commits into from

Conversation

y1cunhui
Copy link

@y1cunhui y1cunhui commented Nov 16, 2021

chrome更新到了96但是selenium目前只支持94...于是决定直接用webdriver自动 搞版本解决问题
测试报备成功
屏幕截图 2021-11-16 092156

@y1cunhui y1cunhui closed this Nov 16, 2021
@y1cunhui y1cunhui reopened this Nov 16, 2021
@SakuraLaurel
Copy link

原来不是没有使用chrome吗,使用的是
driver_pjs = webdriver.PhantomJS(executable_path=sys_path(browser="phantomjs"))

@y1cunhui
Copy link
Author

呃,是这样的,但是PhantomJs在新版本不能用了呀orz

原来不是没有使用chrome吗,使用的是 driver_pjs = webdriver.PhantomJS(executable_path=sys_path(browser="phantomjs"))

@y1cunhui
Copy link
Author

在mac和windows均测试可用~linux就不测了

@Bruuuuuuce
Copy link
Owner

非常感谢pr,由于大多还在使用phantomjs(selenium 3.8.0也暂时够新),所以会先在readme中增加到这个pr的导航,供chrome使用者参考

@y1cunhui
Copy link
Author

非常感谢pr,由于大多还在使用phantomjs(selenium 3.8.0也暂时够新),所以会先在readme中增加到这个pr的导航,供chrome使用者参考

好滴~

@zyHan2077
Copy link

顶顶。Linux默认路径装好chromedriver,之后main.py如下改动

    # driver_pjs = webdriver.PhantomJS(executable_path=sys_path(browser="phantomjs"))

    chrome_options = Options()
    chrome_options.add_argument("--headless")
    driver_pjs = webdriver.Chrome(
            options=chrome_options,
            # executable_path=sys_path(browser="chromedriver"),
            service_args=['--ignore-ssl-errors=true', '--ssl-protocol=TLSv1'])

就可以正常使用了

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

Successfully merging this pull request may close these issues.

4 participants