java.lang.IllegalStateException in chrome driver

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

java.lang.IllegalStateException in chrome driver

prakash moorthi
Hi all,

I just tried to invoke chrome driver in eclipse with below simple program but getting error...plz help me to resolve 

Thanks in advance

config details.

chrome -Version 62.0.3202.62 (64-bit)
java -9.0.1
eclipse -Oxygen
server /standalone -3.6.0




import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;

public class Basic {
WebDriver driver;
public void invoke() {
try {
System.setProperty("webdriver,chrome.driver","C:\\chromedriver_win32\\chromedriver.exe");
System.out.println("hello");
driver=new ChromeDriver();
driver.get("https://www.google.co.in");
} catch (Exception e) {
e.printStackTrace();
}
}
public static void main(String[] args) {
Basic b1=new Basic();
b1.invoke();
}

}

O/P:

hello
java.lang.IllegalStateException: The path to the driver executable must be set by the webdriver.chrome.driver system property; for more information, see https://github.com/SeleniumHQ/selenium/wiki/ChromeDriver. The latest version can be downloaded from http://chromedriver.storage.googleapis.com/index.html
at com.google.common.base.Preconditions.checkState(Preconditions.java:754)
at org.openqa.selenium.remote.service.DriverService.findExecutable(DriverService.java:124)
at org.openqa.selenium.chrome.ChromeDriverService.access$000(ChromeDriverService.java:32)
at org.openqa.selenium.chrome.ChromeDriverService$Builder.findDefaultExecutable(ChromeDriverService.java:137)
at org.openqa.selenium.remote.service.DriverService$Builder.build(DriverService.java:329)
at org.openqa.selenium.chrome.ChromeDriverService.createDefaultService(ChromeDriverService.java:88)
at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:123)
at com.selenium.webdriver.sample.Basic.invoke(Basic.java:13)
at com.selenium.webdriver.sample.Basic.main(Basic.java:23)

--
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/32281af1-5470-4e81-9d7a-cdf328518f82%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: java.lang.IllegalStateException in chrome driver

Chandrika Subramanya
System.setProperty("webdriver,chrome.driver","C:\\chromedriver_win32\\chromedriver.exe"); -------remove , after webdriver and replace it with dot . It should work. thanks
chandrika

On Tuesday, October 24, 2017 at 10:03:09 PM UTC-5, prakash moorthi wrote:
Hi all,

I just tried to invoke chrome driver in eclipse with below simple program but getting error...plz help me to resolve 

Thanks in advance

config details.

chrome -Version 62.0.3202.62 (64-bit)
java -9.0.1
eclipse -Oxygen
server /standalone -3.6.0




import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;

public class Basic {
WebDriver driver;
public void invoke() {
try {
System.setProperty("webdriver,chrome.driver","C:\\chromedriver_win32\\chromedriver.exe");
System.out.println("hello");
driver=new ChromeDriver();
driver.get("<a href="https://www.google.co.in" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.co.in&#39;;return true;" onclick="this.href=&#39;https://www.google.co.in&#39;;return true;">https://www.google.co.in");
} catch (Exception e) {
e.printStackTrace();
}
}
public static void main(String[] args) {
Basic b1=new Basic();
b1.invoke();
}

}

O/P:

hello
java.lang.IllegalStateException: The path to the driver executable must be set by the webdriver.chrome.driver system property; for more information, see <a href="https://github.com/SeleniumHQ/selenium/wiki/ChromeDriver" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2FSeleniumHQ%2Fselenium%2Fwiki%2FChromeDriver\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHSthCMNNShkYJUuBJd13Up2maRFg&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2FSeleniumHQ%2Fselenium%2Fwiki%2FChromeDriver\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHSthCMNNShkYJUuBJd13Up2maRFg&#39;;return true;">https://github.com/SeleniumHQ/selenium/wiki/ChromeDriver. The latest version can be downloaded from <a href="http://chromedriver.storage.googleapis.com/index.html" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://chromedriver.storage.googleapis.com/index.html&#39;;return true;" onclick="this.href=&#39;http://chromedriver.storage.googleapis.com/index.html&#39;;return true;">http://chromedriver.storage.googleapis.com/index.html
at com.google.common.base.Preconditions.checkState(Preconditions.java:754)
at org.openqa.selenium.remote.service.DriverService.findExecutable(DriverService.java:124)
at org.openqa.selenium.chrome.ChromeDriverService.access$000(ChromeDriverService.java:32)
at org.openqa.selenium.chrome.ChromeDriverService$Builder.findDefaultExecutable(ChromeDriverService.java:137)
at org.openqa.selenium.remote.service.DriverService$Builder.build(DriverService.java:329)
at org.openqa.selenium.chrome.ChromeDriverService.createDefaultService(ChromeDriverService.java:88)
at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:123)
at com.selenium.webdriver.sample.Basic.invoke(Basic.java:13)
at com.selenium.webdriver.sample.Basic.main(Basic.java:23)

--
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/0a0a3564-7301-4583-b25d-cb7e988df1ff%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: java.lang.IllegalStateException in chrome driver

Parameshwari Raghavan

Hi,

I have tried to run the below set of codes in eclipse and ended up with the similar exception, Please help.

import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
public class OpenPracto
{
public static void main(String[] args) 
{
//System.setProperty("webdriver.chrome.driver","C:/Users/param/SeleniumDrivers/chromedriver.exe");
System.setProperty("webdriver.chrome.driver","D:\\SeleniumDrivers\\chromedriver.exe");
WebDriver driver=new ChromeDriver();
        System.out.println("Hello World"); 
         
}
}


Thanks,
Parameshwari
On Wednesday, October 25, 2017 at 8:43:35 AM UTC+5:30, Chandrika Subramanya wrote:
System.setProperty("webdriver,chrome.driver","C:\\chromedriver_win32\\chromedriver.exe"); -------remove , after webdriver and replace it with dot . It should work. thanks
chandrika

On Tuesday, October 24, 2017 at 10:03:09 PM UTC-5, prakash moorthi wrote:
Hi all,

I just tried to invoke chrome driver in eclipse with below simple program but getting error...plz help me to resolve 

Thanks in advance

config details.

chrome -Version 62.0.3202.62 (64-bit)
java -9.0.1
eclipse -Oxygen
server /standalone -3.6.0




import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;

public class Basic {
WebDriver driver;
public void invoke() {
try {
System.setProperty("webdriver,chrome.driver","C:\\chromedriver_win32\\chromedriver.exe");
System.out.println("hello");
driver=new ChromeDriver();
driver.get("<a href="https://www.google.co.in" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.co.in&#39;;return true;" onclick="this.href=&#39;https://www.google.co.in&#39;;return true;">https://www.google.co.in");
} catch (Exception e) {
e.printStackTrace();
}
}
public static void main(String[] args) {
Basic b1=new Basic();
b1.invoke();
}

}

O/P:

hello
java.lang.IllegalStateException: The path to the driver executable must be set by the webdriver.chrome.driver system property; for more information, see <a href="https://github.com/SeleniumHQ/selenium/wiki/ChromeDriver" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2FSeleniumHQ%2Fselenium%2Fwiki%2FChromeDriver\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHSthCMNNShkYJUuBJd13Up2maRFg&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2FSeleniumHQ%2Fselenium%2Fwiki%2FChromeDriver\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHSthCMNNShkYJUuBJd13Up2maRFg&#39;;return true;">https://github.com/SeleniumHQ/selenium/wiki/ChromeDriver. The latest version can be downloaded from <a href="http://chromedriver.storage.googleapis.com/index.html" rel="nofollow" target="_blank" onmousedown="this.href=&#39;http://chromedriver.storage.googleapis.com/index.html&#39;;return true;" onclick="this.href=&#39;http://chromedriver.storage.googleapis.com/index.html&#39;;return true;">http://chromedriver.storage.googleapis.com/index.html
at com.google.common.base.Preconditions.checkState(Preconditions.java:754)
at org.openqa.selenium.remote.service.DriverService.findExecutable(DriverService.java:124)
at org.openqa.selenium.chrome.ChromeDriverService.access$000(ChromeDriverService.java:32)
at org.openqa.selenium.chrome.ChromeDriverService$Builder.findDefaultExecutable(ChromeDriverService.java:137)
at org.openqa.selenium.remote.service.DriverService$Builder.build(DriverService.java:329)
at org.openqa.selenium.chrome.ChromeDriverService.createDefaultService(ChromeDriverService.java:88)
at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:123)
at com.selenium.webdriver.sample.Basic.invoke(Basic.java:13)
at com.selenium.webdriver.sample.Basic.main(Basic.java:23)

--
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/4a86f727-02c9-428a-aac4-29e265767bbb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.