Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • We need to add the path of the feature file in the cucmber options and then execute the test file
  • Since we have not yet prepared test script for each definition. On execution, methods would be created using the step definition phrase and would appear in the console, suggesting that we need to implement these methods in order for the test scripts to be executed successfully. Note that the test methods would be having an underscore format.

public class CucumberLoginTest {

 WebDriver driver = null;

 

 @After

 public void close_window() {

  driver.quit();

 }

 

 @Given("^Login Page is open in Firefox.$")

 public void useropensbrowser() {

  driver = new FirefoxDriver();

 driver.get("https://www.google.com/");

  driver.manage().window().maximize();

 }