Why the http://toolsqa.com/automation-practice-form/ opens up even if my script contains error?

Hi, I am still a learner. Have written a script as below, which has error as “The method get(String) is undefined for the type WebDriver”. But still when being run , it opens up the page “http://toolsqa.com/automation-practice-form/”. Where am I doing wrong? Do I need to make any settings changed.. Please guide.. Thanks in advance, Pratilipi

 

MY Script:

package automationFramework;

import automationFramework.WebDriver.FirefoxDriver;

public interface WebDriver {

public class FirefoxDriver implements WebDriver {

public static void main(String[] args) {

// Create a new instance of the Firefox driver
WebDriver driver = new FirefoxDriver();

//Launch the Online Store Website
driver.get(“http://https://www.facebook.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();
}
}
}

Add Comment
  • 0 Answer(s)
  • Your Answer

    By posting your answer, you agree to the privacy policy and terms of service.