Unable to launch chrome browser using selenium 3.1.0

491 views
Skip to first unread message

Sanoj S

unread,
Feb 20, 2017, 10:20:05 PM2/20/17
to Selenium Users

OS:
Windows 7
Selenium Version:
3.1.0
Browser:
Chrome


I used below code for 3.0.1, it was working:


System.setProperty("webdriver.chrome.driver", "D:/chromedriver.exe");
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability(CapabilityType.ACCEPT_SSL_CERTS, true);
driver = new ChromeDriver(capabilities);
System.out.println(driver);

The code is not working on selenium version 3.1.0


Error:

Exception in thread "main" java.lang.NoSuchMethodError: com.google.common.base.Preconditions.checkState(ZLjava/lang/String;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)V

Have any work around in this version?


The information contained in this message is intended for the addressee only and may contain classified information. If you are not the addressee, please delete this message and notify the sender; you should not copy or distribute this message or disclose its contents to anyone. Any views or opinions expressed in this message are those of the individual(s) and not necessarily of the organization. No reliance may be placed on this message without written confirmation from an authorized representative of its contents. No guarantee is implied that this message or any attachment is virus free or has not been intercepted and amended.

Abhineet Singh

unread,
Jun 13, 2017, 8:07:15 AM6/13/17
to Selenium Users
Did you got the resolution for this error.I am getting same error while running code in Firefox

The code I am runningin 3.4.. version is


package MyTC;

import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;

public class Google_TC1 {

public static void main(String[] args) {
WebDriver objWebDriver = new FirefoxDriver();
       string =
       try {Thread.sleep(50000);}
       catch(Exception e) { }
       objWebDriver.close();
}

}


Thanks
Abhineet

Akshat Gupta

unread,
Jun 15, 2017, 1:13:44 AM6/15/17
to Selenium Users
Hi Abhineet Singh,

Add
 `System.setProperty();`
Reply all
Reply to author
Forward
0 new messages