user14782888
user14782888

Reputation: 77

Selenium on Macbook m1

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

Answers (4)

Tomer
Tomer

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

Siddharth Gupta
Siddharth Gupta

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

Beppe C
Beppe C

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

thiswind
thiswind

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

Related Questions