1沛贪、從gitlab下單包解壓后導(dǎo)入 pycharm
2蚯撩、執(zhí)行damon報錯如下
Driver [/Users/name/.wdm/drivers/chromedriver/mac64/97.0.4692.71/chromedriver] found in cache
Traceback (most recent call last):
File "/Users/name/PycharmProjects/seldom-master/demo/run.py", line 4, in <module>
seldom.main(path="./test_dir",
File "/Users/name/PycharmProjects/seldom-master/seldom/running/next_runner.py", line 86, in init
self.open_browser()
File "/Users/name/PycharmProjects/seldom-master/seldom/running/next_runner.py", line 163, in open_browser
Seldom.driver = Browser(BrowserConfig.NAME)
File "/Users/name/PycharmProjects/seldom-master/seldom/driver.py", line 67, in new
return cls.chrome()
File "/Users/name/PycharmProjects/seldom-master/seldom/driver.py", line 100, in chrome
driver = webdriver.Chrome(options=chrome_options,
File "/usr/local/lib/python3.9/site-packages/selenium/webdriver/chrome/webdriver.py", line 70, in init
super(WebDriver, self).init(DesiredCapabilities.CHROME['browserName'], "goog",
File "/usr/local/lib/python3.9/site-packages/selenium/webdriver/chromium/webdriver.py", line 90, in init
self.service.start()
File "/usr/local/lib/python3.9/site-packages/selenium/webdriver/common/service.py", line 105, in start
raise WebDriverException("Can not connect to the Service %s" % self.path)
selenium.common.exceptions.WebDriverException: Message: Can not connect to the Service /Users/name/.wdm/drivers/chromedriver/mac64/97.0.4692.71/chromedriver
3逗爹、解決方法
添加host文件绑蔫,127.0.0.1 localhost
根據(jù)這行報錯查到:WebDriverException("Can not connect to the Service %s" % self.path)
參考:https://blog.csdn.net/Daletxt/article/details/115492724
根源: 之前電腦用switchhost切換過host蛋哭,切換后系統(tǒng)host全部是空
4县习、運行pytest UI腳本報錯:
pip._vendor.urllib3.exceptions.ReadTimeoutError: HTTPConnectionPool(host='mirrors.aliyun.com', port=80): Read timed out.
解決方案:剛開始用pycharm安裝失敗,然后用pip3命令安裝,第一次失敗后按照提示升級了pip3躁愿,再次執(zhí)行后成功
5叛本、運行報錯 allure:command not found
解決方法:
按照allure,參考資料:
添加環(huán)境變量: export PATH=${PATH}:/Users/liyuanyuan/Downloads/software/allure-2.7.0/bin
http://www.reibang.com/p/47e5bafee82d
https://blog.csdn.net/yt1318519610/article/details/110009893