ChromeDriver launching problem

1,652 views
Skip to first unread message

siva prasad

unread,
Aug 20, 2012, 10:28:21 AM8/20/12
to seleniu...@googlegroups.com
Hi,

I am trying to run my rc script in webdriver, when i am trying to run my script in chromedriver i am getting different errors with my code and i gave the path and tried with all posibilities.

This is my code:

1)         System.setProperty("webdriver.chrome.driver","C:\\VCS_Test_Suite\\RC\\.settings\\chromedriver.exe");
                DesiredCapabilities capabilities = DesiredCapabilities.chrome();
                 capabilities.setCapability("chrome.binary", "/usr/lib/chromium/chromium");
                capabilities.setCapability("chrome.switches",Lists.newArrayList("--homepage=about:blank", "--no-first-run"));
              //capabilities.setCapability("chrome.switches", Arrays.asList("--start-maximized"));
               WebDriver driver = new ChromeDriver(capabilities);
2)             //ChromeDriver driver=new ChromeDriver();
driver = new ChromeDriver();

3)             ChromeOptions options = new ChromeOptions();
options.addArguments("--allow-running-insecure-content");
options.addArguments("--lang=ar");
WebDriver driver = new ChromeDriver(options);*/

I tried with all possibilities but it won't run in chrome browser. I am getting erros like this..

1) org.openqa.selenium.WebDriverException: Could not find Chrome binary at: /usr/lib/chromium/chromium (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 1.29 seconds
Build info: version: '2.23.1', revision: '17143', time: '2012-06-08 18:59:28'
System info: os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.7.0_05'
Driver info: driver.version: ChromeDriver
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:188)
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:145)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:458)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:139)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:94)
at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:154)
at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:131)
at vcs.CommonMethods.setup(CommonMethods.java:57)
at vcs.CommonMethods.OpeningBrowser(CommonMethods.java:96)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:80)
at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:551)
at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:213)
at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:138)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:277)
at org.testng.SuiteRunner.run(SuiteRunner.java:240)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:53)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:87)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1197)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1122)
at org.testng.TestNG.run(TestNG.java:1030)
at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:111)
at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:204)
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:175)

2)    java.lang.IllegalStateException: The path to the driver executable must be set by the webdriver.chrome.driver system property; for more information, see http://code.google.com/p/selenium/wiki/ChromeDriver. The latest version can be downloaded from http://code.google.com/p/chromedriver/downloads/list
at com.google.common.base.Preconditions.checkState(Preconditions.java:165)
at org.openqa.selenium.remote.service.DriverService.findExecutable(DriverService.java:118)
at org.openqa.selenium.chrome.ChromeDriverService.createDefaultService(ChromeDriverService.java:61)
at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:107)
at vcs.CommonMethods.setup(CommonMethods.java:60)
at vcs.CommonMethods.OpeningBrowser(CommonMethods.java:96)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:80)
at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:551)
at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:213)
at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:138)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:277)
at org.testng.SuiteRunner.run(SuiteRunner.java:240)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:53)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:87)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1197)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1122)
at org.testng.TestNG.run(TestNG.java:1030)
at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:111)
at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:204)
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:175)
3) 
java.lang.NoSuchMethodError: com.google.common.collect.ImmutableList.copyOf([Ljava/lang/Object;)Lcom/google/common/collect/ImmutableList;
at org.openqa.selenium.chrome.ChromeOptions.addArguments(ChromeOptions.java:88)
at vcs.CommonMethods.setup(CommonMethods.java:49)
at vcs.CommonMethods.OpeningBrowser(CommonMethods.java:97)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:80)
at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:551)
at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:213)
at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:138)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:277)
at org.testng.SuiteRunner.run(SuiteRunner.java:240)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:53)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:87)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1197)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1122)
at org.testng.TestNG.run(TestNG.java:1030)
at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:111)
at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:204)
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:175)

Please let me know if u need any info on this
Thanks & Regards
Siva Prasad Chinta


Mark Collin

unread,
Aug 20, 2012, 10:33:06 AM8/20/12
to seleniu...@googlegroups.com

You seem to be confused about where your chrome driver executable is.

 

Initially you set an env variable like so:

 

System.setProperty("webdriver.chrome.driver","C:\\VCS_Test_Suite\\RC\\.settings\\chromedriver.exe");

 

Then you ignore it and set the chrome driver executable to:

 

capabilities.setCapability("chrome.binary", "/usr/lib/chromium/chromium");

 

and they you get an exception because the chromedriver executable is not available at

 

/usr/lib/chromium/chromium

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To post to this group, send email to seleniu...@googlegroups.com.
To unsubscribe from this group, send email to selenium-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/selenium-users/-/o9JbhldAkEYJ.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Reply all
Reply to author
Forward
0 new messages