I've been struggling with this for the past few hours. I'm trying to install Selenium web driver and have been running into a bunch of errors which prevent me from running the test page. I'm pretty sure my most recent issue is with this code:
"public static void main(String[] args) throws InterruptedException{ System.setProperty("webdriver.gecko.driver","C:/Users/theone/Downloads/geckodriver 2.exe");"
Would really appreciate any feedback on second steps!
package automationFramework;
import org.openqa.selenium.WebDriver; import org.openqa.selenium.firefox.FirefoxDriver;
public class FirstTestCase {
public static void main(String[] args) throws InterruptedException{
System.setProperty("webdriver.gecko.driver","C:/Users/theone/Downloads/geckodriver 2.exe");
// Create a new instance of the Firefox driver
WebDriver driver = new FirefoxDriver();
//Launch the Online Store Website
driver.get("http://ift.tt/1xgcG6b");
// 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();
}
}
Aucun commentaire:
Enregistrer un commentaire