java.lang.IllegalAccessError: tried to access method com.google.common.util.concurrent.SimpleTimeLimiter.
code snippet:
public class FirstSeleniumTest {
WebDriver driver = null;
String baseURL = "https://mail.google.com/";
@BeforeMethod
public void setup() throws InterruptedException {
String currentDir = System.getProperty("user.dir");
System.setProperty("webdriver.chrome.driver", currentDir + "\\executabledrivers\\chromedriver.exe");
driver = new ChromeDriver();
driver.get(baseURL);
Thread.sleep(4000);
}
@Test
public void seleniumTest1() throws InterruptedException {
System.out.println("seleniumTest1");
driver.findElement(By.id("identifierId")).sendKeys("testautomation");
Thread.sleep(2000);
}
@AfterMethod
public void tearDown() {
driver.close();
driver.quit();
}
}
OS: Windows
Browser: Chrome
Browser Version: 66.0.3359.181 (Official Build) (64-bit)
Execute above script
What Selenium version do you use? Show your classpath settings, what versions of dependencies do you have in the classpath.
Selenium version: 3.13.0
This is how my classpath looks like:
@srinivasgoud-n: You comment looks incomplete.
You have
<classpathentry exported="true" kind="lib" path="lib/selenium-java-2.53.1.jar"/>
in the classpath that causes collisions.
Also
<classpathentry exported="true" kind="lib" path="lib/client-combined-3.8.1.jar"/>
Never include multiple versions of the same library to the classpath!
removed above two entries from classpath. still facing same issue..
This is a question rather than an issue. Or al least it's not a Selenium issue but your project misconfiguration. Please send questions to the selenium user group
Caused when your version of selenium is too old and guava is too new. guava > 22.0 will generate this error. Either downgrade to guava.22.0 or upgrade selenium.
Most helpful comment
Caused when your version of selenium is too old and guava is too new. guava > 22.0 will generate this error. Either downgrade to guava.22.0 or upgrade selenium.
See here
https://github.com/SeleniumHQ/selenium/issues/4381