功能:演示
场景:我的第一个场景
在谷歌中输入文字
然后点击搜索
步骤定义 公共类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");
}
}