Manfred Lobo
2018-02-19 18:54:37 UTC
Hi there,
I am new to selenium and trying out different piece of code through online
tutorials. I get this error "Exception in thread "main" java.lang.Error:
Unresolved compilation problem:" when the following code written in eclipse
oxygen is run.
Also there are errors like 'The package org.openqa.selenium is accessible
from more than one module: com.google.common, htmlunit.driver, selenium
- The import org.openqa.selenium.WebDriver cannot be resolved'
Can anyone please help me out with this. Below is the code.
package co.prj1.selenium.webdriver.basic;
import java.util.concurrent.TimeUnit;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.chromedriver;
public class Day1 {
WebDriver driver;
public void invokeBrowser(){
try {
System.setProperty("webdriver.chrome.driver",
"C:\\Users\\LOBO\\Desktop\\Manfred\\Edureka Tutorial\\chromedriver.exe");
driver=new chromedriver();
driver.manage().deleteAllcookies();
driver.manage().window().maximize();
driver.manage().timeouts().implicitlyWait(30,TimeUnit.SECONDS);
driver.manage().timeouts().pageloadtimeout(30,TimeUnit.SECONDS);
driver.get("http://www.edureka.co");
} catch (Exception e) {
e.printStackTrace();
}
}
public static void main(String[] args) {
Day1 myobj = new Day1();
myobj.invokeBrowser();
}
}
I am new to selenium and trying out different piece of code through online
tutorials. I get this error "Exception in thread "main" java.lang.Error:
Unresolved compilation problem:" when the following code written in eclipse
oxygen is run.
Also there are errors like 'The package org.openqa.selenium is accessible
from more than one module: com.google.common, htmlunit.driver, selenium
- The import org.openqa.selenium.WebDriver cannot be resolved'
Can anyone please help me out with this. Below is the code.
package co.prj1.selenium.webdriver.basic;
import java.util.concurrent.TimeUnit;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.chromedriver;
public class Day1 {
WebDriver driver;
public void invokeBrowser(){
try {
System.setProperty("webdriver.chrome.driver",
"C:\\Users\\LOBO\\Desktop\\Manfred\\Edureka Tutorial\\chromedriver.exe");
driver=new chromedriver();
driver.manage().deleteAllcookies();
driver.manage().window().maximize();
driver.manage().timeouts().implicitlyWait(30,TimeUnit.SECONDS);
driver.manage().timeouts().pageloadtimeout(30,TimeUnit.SECONDS);
driver.get("http://www.edureka.co");
} catch (Exception e) {
e.printStackTrace();
}
}
public static void main(String[] args) {
Day1 myobj = new Day1();
myobj.invokeBrowser();
}
}
--
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-users+***@googlegroups.com.
To post to this group, send email to selenium-***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/f5f209cd-ef87-467c-b9f3-c7c7fa37bcf0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
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-users+***@googlegroups.com.
To post to this group, send email to selenium-***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/f5f209cd-ef87-467c-b9f3-c7c7fa37bcf0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.