selenium webdriver on Intellij Idea does not launch chrome browser but launches firefox successfully

409 views
Skip to first unread message

Vijay Reddy

unread,
Jul 24, 2018, 10:13:48 AM7/24/18
to Selenium Users
I have the below code to launch chrome using selenium webdriver it runs without any errors but does not launch chrome browser what could be the issue.
Using latest version of chrome, chromedriver and selenium webdriver on mac.

import org.openqa.selenium.*;
import org.openqa.selenium.chrome.*;
import org.openqa.selenium.firefox.*;

public class DemoChrome {
public static void main(String[] args) throws Exception{
// System.setProperty("webdriver.gecko.driver", "Resources/geckodriver");
// WebDriver driver=new FirefoxDriver();

System.setProperty("webdriver.chrome.driver", "Resources/chromedriver");
WebDriver driver=new ChromeDriver();



driver.get("http://5elementslearning.com/demosite");
//the above command will launch the chrome browser with this application.

Thread.sleep(5000); //wait for 5 seconds

driver.quit(); //close all instance of chrome browser which are opened from this program.
}
}

monika16jha .

unread,
Jul 24, 2018, 10:17:13 AM7/24/18
to seleniu...@googlegroups.com
Mention complete "chromebrowser.exe"
Add extension of chrome browser


--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-users+unsubscribe@googlegroups.com.
To post to this group, send email to selenium-users@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/ed1560be-b59f-4974-a383-e45c98edf799%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages