chima
asked on
Eclipse Java import and method not resolved
Hello,
I have a couple of "unresolved" issues. I tried fixing my problems using the options within Eclipse, but nothing works.
I know that I have in import/install the org.opeqa.selenium API, yet can't find the API at org.openqa, and I know that my Selenium API needs to be installed as well. I thought I did have it via Selinity - Selenium plugin, but I guess not.
These are my issues;
import org.openqa...cannot be resolved
FirefoxDriver cannot be resolved to a type
Method undined for WebDriver
This is the code;
import org.junit.Test;
import org.openqa.selenium.WebDri ver;
import org.openqa.selenium.firefo x.FirefoxD river;
public class MyFirstWebdriverTest<WebDr iver> {
@Test
public void checkSeleniumHQinFirefox() {
WebDriver driver = new FirefoxDriver();
driver.get("http://seleniumhq.org");
driver.quit();
}
}
I have a couple of "unresolved" issues. I tried fixing my problems using the options within Eclipse, but nothing works.
I know that I have in import/install the org.opeqa.selenium API, yet can't find the API at org.openqa, and I know that my Selenium API needs to be installed as well. I thought I did have it via Selinity - Selenium plugin, but I guess not.
These are my issues;
import org.openqa...cannot be resolved
FirefoxDriver cannot be resolved to a type
Method undined for WebDriver
This is the code;
import org.junit.Test;
import org.openqa.selenium.WebDri
import org.openqa.selenium.firefo
public class MyFirstWebdriverTest<WebDr
@Test
public void checkSeleniumHQinFirefox()
WebDriver driver = new FirefoxDriver();
driver.get("http://seleniumhq.org");
driver.quit();
}
}
ASKER
Siva, I downloaded the Selenium zip file, extracted the file/folder, and added the path to the System Environmental variable path;
C:\Selenium-java-3.1.0\lib Yet this did not solve my "resolve" issue. I'll search for the solution, yet I thought I'd enter this comment here/now.
C:\Selenium-java-3.1.0\lib
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks
You need to download the selenium web driver jars from here and add this to your project build path..
http://selenium-release.storage.googleapis.com/3.1/selenium-java-3.1.0.zip
Download the above link and then you find selenium jar which needs to be added to build path.