I have downloaded all the necessary jar files from here
I am unable to import and start a new instance of Firefox driver even though I am able too see that the jar(client-combined-3.4.0-nodeps.jar
) have FirefoxDriver class as well.
Line import org.openqa.selenium.firefox.FirefoxDriver
is giving compilation error. Unable to resolve error.
Complete code:
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;//Error
public class FirstTestCase {
public static void main(String[] args) {
System.setProperty("webdriver.gecko.driver", "D:\\\\ToolsQA\\trunk\\Library\\drivers\\geckodriver.exe");
//This line is giving the error. I can see FirfoxDriver class inside Jar.
WebDriver driver = new FirefoxDriver();
//Launch the Online Store Website
driver.get("http://www.store.demoqa.com");
// Print a Log In message to the screen
System.out.println("Successfully opened the website www.Store.Demoqa.com");
//Wait for 5 Sec
Thread.sleep(5);
// Close the driver
driver.quit();
}
}
wondering why this error is coming