I am new to selenium.I am getting some issues while using Selenium WebDriver.
I want to open website using Selenium WebDriver like www.filpkart.com
My Code
package com.screen;
import org.openqa.selenium.*;
import org.openqa.selenium.firefox.FirefoxDriver;
public class HTMLParseExample {
public static void main(String[] args) {
WebDriver driver = new FirefoxDriver();
//Launch website
driver.get("http://www.flipkart.com");
driver.close();
}
}
I am facing This Error mentioned below.
Exception in thread "main" java.lang.NoSuchMethodError: com.google.common.io.Closeables.closeQuietly(Ljava/io/Closeable;)V
at org.openqa.selenium.firefox.internal.ClasspathExtension.writeTo(ClasspathExtension.java:60)
at org.openqa.selenium.firefox.FirefoxProfile.installExtensions(FirefoxProfile.java:504)
at org.openqa.selenium.firefox.FirefoxProfile.layoutOnDisk(FirefoxProfile.java:482)
at org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.start(NewProfileExtensionConnection.java:76)
at org.openqa.selenium.firefox.FirefoxDriver.startClient(FirefoxDriver.java:142)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:80)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:121)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:77)
at com.screen.HTMLParseExample.main(HTMLParseExample.java:15)
Help me out Thanks in Advance.
Looks like you have incompatible versions of selemenium and com.google.guava
.
The method is existent and deprecated in version 15. but in version 19 it is not longer existent.
guava v 19 worked for me
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>19.0</version>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With