Reputation: 77
I was wondering to buy a new macbook Air M1. I wanted to know if selenium testing tool working properly on the same machine? Please share your experience if anyone has tried it yet.
Upvotes: 5
Views: 23092
Reputation: 400
I found a way to run Selenium and it worked pretty good
You should run the docker on amd64 mode. To build an image for a different architecture:
docker buildx build --platform=linux/amd64 .
Then when you run it with
docker run --platform=linux/amd64
I read it in this guy blog and it worked perfectly: Using Apple Silicon (M1) as a cloud enginee
Upvotes: 5
Reputation: 71
I use Python Selenium, and can confirm that it's working with MacBook Pro M1 with the chromedriver. Thanks to @Beppe C's answer, I stopped trying to get the Firefox driver to work since geckodriver is not yet fixed to work on M1s.
Also, this link below will help any Mac newbie like me set the chromedriver in PATH, so it starts working:
https://www.edureka.co/community/52315/how-to-setup-chrome-driver-with-selenium-on-macos
Upvotes: 5
Reputation: 13973
As today (mid March) for Chrome you can find the chromedriver for Mac M1 on the chromedriver storage and run Selenium Webdriver against (headless) Chrome.
I have migrated successfully my test suite (Selenium Python), including screenshot capturing.
Firefox does not provide a native Apple geckodriver, this is still being worked on (see https://bugzilla.mozilla.org/show_bug.cgi?id=1677471) but (as many other apps at the moment) can run on top of Rosetta
Upvotes: 2
Reputation: 91
selenium docker is not running on M1, although the container and the X11 VNC server is running, but the chrome in the docker container can not be started.
Upvotes: 8