286 [main] INFO net.thucydides.core.webdriver.SystemPropertiesConfiguration - project.build.directory : null287 [main] INFO net.thucydides.core.webdriver.SystemPropertiesConfiguration - project.reporting.OutputDirectory : null
<dependencies>
<dependency>
<groupId>net.serenity-bdd</groupId>
<artifactId>serenity-core</artifactId>
<version>${serenity.version}</version>
</dependency>
<dependency>
<groupId>net.serenity-bdd</groupId>
<artifactId>serenity-junit</artifactId>
<version>${serenity.version}</version>
</dependency>
<dependency>
<groupId>net.serenity-bdd</groupId>
<artifactId>serenity-screenplay</artifactId>
<version>${serenity.version}</version>
</dependency>
--
You received this message because you are subscribed to the Google Groups "Serenity BDD Users Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to thucydides-use...@googlegroups.com.
To post to this group, send email to thucydid...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
@RunWith(SerenityRunner.class)
public class LoginFeatures {
@Steps
OrdererSteps ordererSteps;
@Title("Ensure normal user can login with valid password")
@Test
public void shouldGotoHomePage(){
ordererSteps.openLoginPage();
ordererSteps.loginToHomePage("scor...@gmail.com","abc123456");
}
}
public class OrdererSteps{LoginPage loginPage;
@Step("Open the login page")
public void openLoginPage(){
// GIVEN
loginPage.open();
loginPage.getDriver().manage().window().maximize();
}
@Step("Login to home page")
public void loginToHomePage(String email, String pwd){
// WHEN
loginPage.clickGetStartedLink();
// AND
loginPage.enterToEmailInput(email);
// AND
loginPage.enterToPwdInput(pwd);
// AND
loginPage.clickLoginButton();
// THEN the homepage display
}
}
@DefaultUrl("https://www.testloginpage.com/#/")public class LoginPage extends PageObject {
@FindBy(xpath = "//div[@class='inner-background animated fadeInDown']/a[@ng-click='show_login_holder()']")
private WebElementFacadeImpl getStartedLink;
@FindBy(xpath = "//*[@id='login_email']")
private WebElementFacadeImpl emailInput;
@FindBy(xpath = "//*[@id='login_password']")
private WebElementFacadeImpl pwdInput;
@FindBy (xpath = ".//*[@id='login_holder']//button[@type='submit']")
private WebElementFacadeImpl loginButton;
public void clickGetStartedLink(){
getStartedLink.click();
}
public void enterToEmailInput(String email){
emailInput.sendKeys(email);
}
public void enterToPwdInput(String pwd){
pwdInput.sendKeys(pwd);
}
public void clickLoginButton(){
loginButton.click();
_______________________________________________