- It is portion the code after
driver=new ChromeDriver();
line it give me error i check with sysout, errors are in the 2, well i am not well experienced using Maven but i am checking mypom.xml
file , i gave Selenium dependencies.
-Any advice?, any helps appreciated
public WebDriver initilizeDriver() throws IOException
{
Properties prop= new Properties();
FileInputStream fıs=new FileInputStream("C:\\Users\\Melih Sancak\\my-amazonTest\\src\\main\\java\\com\\ObjectRepisotary\\app\\data.properties");
prop.load(fıs);
String browserName =prop.getProperty("browser");
System.out.println(browserName);
if(browserName.equals("chrome"))
{
System.setProperty("webdriver.chrome.driver", "C:\\Users\\Melih Sancak\\Downloads\\chromedriver.exe");
driver=new ChromeDriver();
}
}
2. Error:
java.lang.NoClassDefFoundError: com/google/common/collect/ImmutableMap
at org.openqa.selenium.remote.service.DriverService$Builder.<init>(DriverService.java:253)
at org.openqa.selenium.chrome.ChromeDriverService$Builder.<init>(ChromeDriverService.java:94)
at org.openqa.selenium.chrome.ChromeDriverService.createDefaultService(ChromeDriverService.java:88)
at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:123)