Laveen sharma
Laveen sharma

Reputation: 11

Java selenium " The import org cannot be resolved"

I have deleted the earlier version of eclipse I was using also updated the selenium 3.0.1, also added all the .jar files but now I'm getting a new error.

"The import org cannot be resolved"

Below is the code:

import java.util.concurrent.TimeUnit;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;

public class findByLinkedText {

  public static void main(String[] args) {
    System.setProperty("Webdriver.gecho.driver",
      "C:\\Users\\lsharma1\\Desktop\\Selenium Drivers\\Gecho 
      driver\\ gechodriver.exe ");
      WebDriver driver = new FirefoxDriver();

      drive.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS); String URL = "https://www.google.co.in/"; driver.get(URL); driver.close();

    }

  }

Upvotes: 1

Views: 1726

Answers (1)

dangi13
dangi13

Reputation: 1275

use this maven dependency in your pom :

        <dependency>
            <groupId>org.seleniumhq.selenium</groupId>
            <artifactId>selenium-java</artifactId>
            <version>3.3.1</version>
        </dependency>

It is not recognizing this org package.
Hope that helps you.

May be the problem is that your selenium dependency has not been downloaded in your users/usename/.m2 folder.

Upvotes: 1

Related Questions