Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Use Selenium with Chromium Browser

Tags:

In the Selenium options (on Firefox) I can find Custom browser.

Is it possible to use this option to run a Selenium test in Chromium Browser (not Chrome)?

like image 366
RusAlex Avatar asked Apr 20 '11 14:04

RusAlex


People also ask

Does Selenium work with Chromium?

Through WebDriver, Selenium supports all major browsers on the market such as Chrome/Chromium, Firefox, Internet Explorer, Edge, Opera, and Safari.

What is Chromium driver for Selenium?

chromium. webdriver. Controls the WebDriver instance of ChromiumDriver and allows you to drive the browser. Controls the WebDriver instance of ChromiumDriver and allows you to drive the browser.

Can you use Selenium with Chrome?

Selenium test scripts can be written in different programming languages like Java, Python, C# and many more. These test scripts can run across various browsers like Chrome, Safari, Firefox, Opera and also provides support across various platforms like Windows, Mac OS, Linux, Solaris.

How do I use Chromium drivers?

New Selenium IDEVisit the link: https://chromedriver.chromium.org/downloads. There shall be links available for download for various chromedriver versions. Select the version which is compatible with the Chrome available to our system. Click on it.


2 Answers

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.

like image 149
Izkata Avatar answered Oct 06 '22 15:10

Izkata


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.

like image 20
mryan Avatar answered Oct 06 '22 16:10

mryan