P
P
PesyCorm2021-03-28 17:35:01
Python
PesyCorm, 2021-03-28 17:35:01

Error when running UI tests (python + selenium + pytest) on gitlab-ci?

Hey! I'm trying to run tests on gitlab-ci , but I get an error from the following code ( in this job ):

driver = EventFiringWebDriver(webdriver.Remote(command_executor="http://selenium__standalone-chrome:4444/wd/hub"), MyListener(get_logger()))

606093b8887a6808993455.png
Have I described driver initialization correctly?
MyListener(get_logger())is used to create a logger
The code is used in this fixture
Tell me how to fix the error?
Thank you!

UPD:
In the end, I solved the problem by loading the driver in before_script:
- wget https://github.com/mozilla/geckodriver/releases/download/v0.26.0/geckodriver-v0.26.0-linux64.tar.gz
    - tar -xvzf geckodriver-v0.26.0-linux64.tar.gz
    - chmod +x geckodriver

And also by adding the browser name capability to conftest.py
wd = webdriver.Remote(command_executor="http://selenium__standalone-firefox:4444/wd/hub",
desired_capabilities={'browserName': 'firefox'})

+ ran from a local runner, not shared-runners from gitlab

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question