Search code examples
dockerselenium-webdrivergitlab-cirobotframework

TypeError: WebDriver.__init__() got an unexpected keyword argument 'browser_profile' in robot + selenium


I have a pipeline that runs robot tests using the seleniarm/standalone-chromium as webdriver. everething was fine until some days ago. It looks like the selenium updated to v4.10 and they removed the "browser_profile" parameter from the init method in the webdriver class as shown in this print:

enter image description here

found in this link

I started receiving the following error during the robot job of my pipeline: enter image description here

the solution was obvious to me, downgrade the version to one below 4.10 and it would be fine, but... it did not work.

I tried with many different versions but none of them worked.

my setup is: one container for selenium that i run with the following command ->

docker run -d --rm -p 4444:4444 -p 5900:5900 -p 7900:7900 --shm-size 2g --name webdriver seleniarm/standalone-chromium:4.9.1

and another custom container that have robotframework==6.0.2 and robotframework-seleniumlibrary==6.0.0

does anyone know what is happening?


Solution

  • I had the same issue (and a similar setup).

    To solve it, I've updated the dockerfile for my custom container.

    Instead of only:

    RUN pip install robotframework-seleniumlibrary
    

    Explicitly install selenium==4.9.1:

    RUN pip install selenium==4.9.1
    RUN pip install robotframework-seleniumlibrary==6.0.0