I'm very new to Selenium. Below given is my first test script.
package package1;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
public class Tutorials1 {
public static void main(String[] args) {
String exepath="C:\\Users\\sh370472\\Desktop\\chromedriver_win32/chromedriver.exe";
System.setProperty("webdriver.chrome.driver", exepath);
WebDriver driver=new ChromeDriver();
driver.get("https://www.shipper-ml.com");
driver.findElement(By.id("inpUserId")).sendKeys("xxxxxxxx");
driver.findElement(By.id("inpPassword")).sendKeys("xxxxxxxxxxxxxx");
driver.findElement(By.id("btnLogonLabel")).click();
}
}
While executing the above code I am getting below exceptions :
Exception in thread "main" java.lang.IllegalAccessError: tried to access method com.google.common.util.concurrent.SimpleTimeLimiter.<init>(Ljava/util/concurrent/ExecutorService;)V from class org.openqa.selenium.net.UrlChecker
at org.openqa.selenium.net.UrlChecker.<init>(UrlChecker.java:48)
at org.openqa.selenium.chrome.ChromeDriverService.start(ChromeDriverService.java:164)
at org.openqa.selenium.chrome.ChromeCommandExecutor.execute(ChromeCommandExecutor.java:46)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:415)
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:144)
at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:86)
at package1.Tutorials1.main(Tutorials1.java:12)
Starting ChromeDriver 2.43.600210 (68dcf5eebde37173d4027fa8635e332711d2874a) on port 17780
Only local connections are allowed.
NOTE : Also tried executing the same script from Internet Explorer also, still getting the same. It just opens the browser and closes(because of finally block) it.
Can anyone please suggest if I am missing anything.