报错信息: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
欢迎来到testingpai.com!
注册 关于