Is it possible to run a Selenium test in Chromium Browser (not Google Chrome Browser)?
My Google Drive location:
My Chromium location:
FYI: I am using Java
My code (at the moment I am running FirefoxDriver (gecko):
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
public class MainClass {
public static void main(String[] args) {
System.setProperty("webdriver.gecko.driver", "C:\\Users\\User\\IdeaProjects\\testselenium\\drivers\\geckodriver.exe");
WebDriver driver = new FirefoxDriver();
driver.get("https://www.seleniumhq.org/");
}
}
I thought that this code would help, but it was without success. It runs Google Chrome, not Chromium:
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
public class Chromium {
public static void main(String[] args) {
System.setProperty("webdriver.chrome.driver", "C:\\Users\\User\\IdeaProjects\\testselenium\\drivers\\chromedriver.exe");
System.setProperty("webdriver.chrome.binary", "C:\\Users\\User\\Downloads\\chrome-win\\chrome-win\\chrome.exe");
WebDriver driver = new ChromeDriver();
driver.get("https://www.seleniumhq.org/");
}
}
What could be the problem? How can this question be resolved?