2

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.

user14782888
  • 47
  • 1
  • 1
  • 2
  • 3
    should be able to run Windows/Linux/MacOS/Java on that machine. All are supported by Selenium. You should probably mention what OS you'll be running, though. – pcalkins Dec 07 '20 at 21:45

4 Answers4

7

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.

thiswind
  • 81
  • 1
  • 4
  • 1
    It should work by now as the Issue: https://github.com/mozilla/geckodriver/issues/1978 seems to be solved – arquillos Jun 09 '22 at 08:23
5

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

4

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

Tomer
  • 335
  • 4
  • 15
1

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

Beppe C
  • 11,256
  • 2
  • 19
  • 41
  • how do you run Selenium Webdriver against Chrome? I have the following error message:Error: Can't connect to WebDriver. Error: Failed to create session. socket hang up Please make sure Selenium Server (ChromeDriver or PhantomJS) is running and accessible – Allyson May 19 '21 at 08:09