I'm creating a basic selenium Webdriver program by adding the selenium jars and relative jars, below is my code. but when i try to resolve firefordriver and webdriver for importing them. im getting "The import org cannot be resolved" error.
Environment 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();
}
}
delete module-info.java file or any other module file that was created at the time of creating the project. That will resolve the issue.
For me, the jar files responsible for spring framework were not their in the JRE, so i downloaded the respective jars and added in the build path.
below is the link which i followed and it worked for me.
Remember to see the section : "2) Add spring jar files" from the below link:
refer this link
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With