Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in DevOps and Agile by (19.7k points)

I first installed Chromium and prepared my Selenium tests to run with it (I have the chromeDriver and I did create the symbolic link google-chrome pointing to chromium-browser). Everything was running smooth.

Later I did install the google-chrome browser to debug some node.js application and since then Selenium opens Google Chrome instead of Chromium.

I can not figure out how to get back selenium opening Chromium. The symbolic link does exist and points to chromium-browser.

How to run Selenium with Chromium when google-chrome is also available on the system?

What about update-alternatives?

$ ls -lah /usr/bin/google-chrome

/usr/bin/google-chrome -> /etc/alternatives/google-chrome

$ ls -lah /etc/alternatives/google-chrome

/etc/alternatives/google-chrome -> /usr/lib/chromium-browser/chromium-browser

1 Answer

0 votes
by (62.9k points)

From the doc here(https://github.com/seleniumhq/selenium-google-code-issue-archive): "For Linux systems, the ChromeDriver expects /usr/bin/google-chrome to be a symlink to the actual Chrome binary. Also, see the section on overriding the Chrome binary location ." unfortunately that section doesn't seem to exist on that page however I think I found it elsewhere: executing in a non-standard location, so that's the way to go:

ChromeOptions options = new ChromeOptions();

options.setBinary("/path/to/other/chrome/binary");

If you are interested to learn Selenium on a much deeper level and want to become a professional in the testing domain, check out Intellipaat’s Selenium course!

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...