Link to home
Start Free TrialLog in
Avatar of chima
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.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;

public class MyFirstWebdriverTest<WebDriver> {
      @Test
      public void checkSeleniumHQinFirefox(){
        WebDriver driver = new FirefoxDriver();
        driver.get("http://seleniumhq.org");
        driver.quit();
      }
}
Avatar of Siva Prasanna Kumar
Siva Prasanna Kumar
Flag of India image

Hi Chima,

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.
Avatar of chima
chima

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.
ASKER CERTIFIED SOLUTION
Avatar of Siva Prasanna Kumar
Siva Prasanna Kumar
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of chima

ASKER

Thanks