Hi,
I need help. I can't launch chrome using Selenium. I tried doing the recommended fix of updating chrome and also tried to use guava 20, 21 and 22 but still i get the same error as below when i run the code. See code and error for reference. Appreciate all the help i can get. Thanks!
Code:
package TestPack;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
public class SE {
public static void main(String args[])
{
System.setProperty("webdriver.chrome.driver","C:\\Users\\albert.g.nangkil\\workspace\\chromedriver.exe");
WebDriver driver = new ChromeDriver();
driver.get ("www.google.com");
driver.manage().window().maximize();
driver.getTitle();
System.out.println(driver.getTitle());
}
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
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:330)
at org.openqa.selenium.chrome.ChromeDriverService.createDefaultService(ChromeDriverService.java:88)
at org.openqa.selenium.chrome.ChromeDriver.(ChromeDriver.java:124)
Can you show us how you are managing your CLASSPATH ? You can perhaps share your pom.xml/build.gradle to add more context.
Thanks & Regards
Krishnan Mahadevan
"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribbings @ http://rationaleemotions.wordpress.com/
--
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-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/a2914493-5e53-477a-a878-cbae0cc89803%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Can you please tell us how are you building your CLASSPATH ? Perhaps you could share your pom.xml (or) your build.gradle file ?
If you are NOT using any of the build tools to manage your CLASSPATH, I would strongly recommend that you please do. That way its easy to deal with classpath conflicts and avoid errors such as NoSuchMethodError etc.,
Thanks & Regards
Krishnan Mahadevan
"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribbings @ http://rationaleemotions.wordpress.com/
From: <seleniu...@googlegroups.com> on behalf of Abhineet Singh <abhin...@gmail.com>
Reply-To: <seleniu...@googlegroups.com>
Date: Tuesday, June 13, 2017 at 2:07 PM
To: Selenium Users <seleniu...@googlegroups.com>
--
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-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/3a0bbe33-2a83-4379-a7c8-5e4004ebf1fd%40googlegroups.com.