Java – “The import org cannot be resolved” error when importing in Eclipse Photon using Selenium standalone server 3.9.1

“The import org cannot be resolved” error when importing in Eclipse Photon using Selenium standalone server 3.9.1… here is a solution to the problem.

“The import org cannot be resolved” error when importing in Eclipse Photon using Selenium standalone server 3.9.1

I’m creating a basic selenium Webdriver program by adding selenium jars and related jars, here’s my code. But when I try to parse firefordriver and webdriver to import them. I’m getting a “Unable to parse imported organization” error.

Environmental details:

JavaSe-10.

Eclipse Version Photon Release (4.8.0) Build id: 20180619-1200

Selenium StandAlone server 3.9.1

Code:

package selenium;

import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;

public class WebDriverBasics {

public static void main(String[] args) {

1. Firefox browser. 
        geckodriver.
        System.setProperty("webdriver.gecko.driver","d:\\installations\\eclipse\\jars\\geckodriver.exe");
        WebDriver driver = new FirefoxDriver();
    }
}

Solution

Delete the module-info.java file or any other module files that were created when you created the project. This will solve the problem.

module-info.java

error resolved

Related Problems and Solutions