Я настраиваю тест автоматизации Python, используя селен и pytest, моя цель - запустить его на Circleci 2.0.
Локальные тесты запущены и работают, но эта ошибка возникает на сервере CircleCi, незнаю, почему я пытался обновить модули проекта (но это не так)
def test_setup(self):
options = webdriver.ChromeOptions()
options.add_argument('-headless')
self.driver = webdriver.Chrome(executable_path=ChromeDriverManager().install(), options=options)
self.driver.maximize_window()
self.driver.get(self.url)
yield
self.driver.quit()
Я сталкиваюсь со следующими ошибками:
venv/lib/python3.6/site-packages/selenium/webdriver/chrome/webdriver.py:73: in __init__
self.service.start()
venv/lib/python3.6/site-packages/selenium/webdriver/common/service.py:98: in start
self.assert_process_still_running()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <selenium.webdriver.chrome.service.Service object at 0x7f52e8a66a90>
def assert_process_still_running(self):
return_code = self.process.poll()
if return_code is not None:
raise WebDriverException(
'Service %s unexpectedly exited. Status code was: %s'
> % (self.path, return_code)
)
E selenium.common.exceptions.WebDriverException: Message: Service /home/circleci/.wdm/chromedriver/75.0.3770.8/linux64/chromedriver unexpectedly exited. Status code was: 127
venv/lib/python3.6/site-packages/selenium/webdriver/common/service.py:111: WebDriverException
---------------------------- Captured stdout setup -----------------------------
Checking for linux64 chromedriver:75.0.3770.8 in cache
There is no cached driver. Downloading new one...
Trying to download new driver from http://chromedriver.storage.googleapis.com/75.0.3770.8/chromedriver_linux64.zip
Unpack archive /home/circleci/.wdm/chromedriver/75.0.3770.8/linux64/chromedriver.zip
________ ERROR at setup of TestExperiment.test_search_tutors_from_genf ```
>E selenium.common.exceptions.SessionNotCreatedException: Message: >Unable to find a matching set of capabilities
>venv/lib/python3.6/site->packages/selenium/webdriver/remote/errorhandler.py:242: >SessionNotCreatedException