[备忘录] 解决 web 自动化与 jenkins 集成时报的调不起浏览器的错误

本贴最后更新于 1345 天前,其中的信息可能已经水流花落

报错信息:selenium.common.exceptions.WebDriverException: Message: unknown Error: cannot find Chrome binary

疑似原因:chrome.exe放在Administrator下造成的权限问题

检查思路:
1.检查chrome和chromedriver版本对应问题
2.检查jenkins版本与pip安装的allure插件匹配问题 pytest-allure-adaptor / pytest-allure
3.检查chrome的路径问题

最终解决办法:
conftest.py的每个fixture中加上三行代码如图。

参考资料:
https://www.cnblogs.com/yhleng/p/9503819.html
https://stackoverflow.com/questions/46026987/selenium-gives-selenium-common-exceptions-webdriverexception-message-unknown

image.png

1 回帖
请输入回帖内容 ...
  • xiaojian

    😎 😎 😎 前人栽树,后面乘凉。后续有同学遇到这个问题,就可以看此帖解决问题啦。