Use Selenium with Chromium Browser Use Selenium with Chromium Browser selenium selenium

Use Selenium with Chromium Browser


Uh, the accepted answer doesn't answer the question. Google Chrome is based on Chromium, but they're not the same browser.

This is what you want: (since Chromium isn't officially supported)

DefaultSelenium selenium = new DefaultSelenium("localhost", 4444, "*custom C:/path/to/chromium.exe" , "www.google.com");selenium.start();

Edit 2018-08: Looks like the accepted answer changed to a copy of this one several years later, so my original comment is no longer correct. I'm leaving it there, but struck out, because the votes are misleading if I straight remove it.


On unix systems, you can do something like

sudo ln -s /usr/lib/chromium-browser/chromium-browser /usr/bin/google-chrome

and then you can use "*googlechrome" as the lauch parm when creating your DefaultSelenium instance.


(Python)

You can use chromium-chromedriver instead of the vanilla chromedriver. It can be installed via apt-get like "sudo apt-get install chromium-chromedriver"

In my scripts I then configure the chromebrowser and driver to use the chromium exe and chromedriver exe like:

from selenium import webdriverfrom selenium.webdriver.chrome.options import Optionsoptions = Options()options.BinaryLocation = "/usr/bin/chromium-browser"driver = webdriver.Chrome(executable_path="/usr/bin/chromedriver",options=options)driver.get("https://www.google.com")