Feature file
Feature: Demo
Scenario: My First Scenario
When enter text in google
And click on Search
Step Definition public class LoginSteps {
public WebDriver driver = null;
public LoginSteps() {
driver = hooks .driver;
}
@When("^enter text in google$")
public void enter_text_in_google() throws Throwable {
System.out.println("Inside LoginSteps1");
}
@When("^click on search bar$")
public void click_on_search_bar() throws Throwable {
System.out.println("Inside LoginSteps2");
}
}
public class hooks {
public static WebDriver driver = null;
@Before()
public void inti() {
System.out
.println("------------------First Line of the code ---------------");
}
@After()
public void tearDown() {
System.out.println("---------Closing the Sceanrio");
}
}