功能:领英注册 我想将此模板用于我的功能文件
@nimit 方案概要:验证LinkedIn网站是否已启动并正在运行 Given Environment将使用TestData“”验证LinkedIn网站 当用户导航到LinkedHome页面时 然后,欢迎页面应显示给用户 然后应显示“立即加入并登录”按钮 例子: |测试数据集| | SCN1#TD1 |
公共类LinkedSignupScenarios {
LinkedInSignupPage page = new LinkedInSignupPage();
@Given("^Environment is up to verify LinkedIn site using TestData \"([^\"]*)\"$")
public void InitiateTest(String Testdata) {
System.out.println("===User setup environment");
page.createTest(Testdata, "LinkedInSignupTestData");
}
@When("^User navigate to LinkedHome Page$")
public void navigateTo() {
Assert.assertThat("Validate navigation",true,is(page.navigate("url")));
}
@Then("^Welcome page should displayed to user$")
public void isWelcomePageDisplayed() {
Assert.assertThat("Validation for Welcome Page",
true,
is(page.isPagedisplayed("PageTitle","Linkedin.Heading")));
}
@Then("^'Join Now & Sign in' button should be displayed$")
public void join_Now_Sign_in_button_should_be_displayed() throws Throwable {
Assert.assertThat("Validation for Join Now link",
true,
is(page.isPresent("Linkedin.JoinNow")));
}
}
答案 0 :(得分:0)
通过升级范围报告版本使其工作