Skip to content

Instantly share code, notes, and snippets.

@bkmeneguello
Created March 13, 2015 13:45
Show Gist options
  • Save bkmeneguello/9140fb3dd80c38fd6598 to your computer and use it in GitHub Desktop.
Save bkmeneguello/9140fb3dd80c38fd6598 to your computer and use it in GitHub Desktop.
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import almeida.paulorocha.webdriverexp.annotations.AbstractPage;
import almeida.paulorocha.webdriverexp.annotations.PageElement;
import almeida.paulorocha.webdriverexp.annotations.PageElement.ComponentType;
@SubPages({
@SubPage(name="painel", returnType=PainelPage.class) //public PainelPage getPainel() ...
})
public class TestTemplate extends AbstractPage {
public TestTemplate(WebDriver driver) {
super(driver);
}
@PageElement(type = ComponentType.BUTTON, generateAssert = false)
protected WebElement cancel;
@AlternativeFlows({
@AlternativeFlow(siffix="comFalha", returnType=FalhaPage.class) //public FalhaPage clickSaveComFalha() ...
})
@PageElement(type = ComponentType.BUTTON, generateAssert = false, returnType = ReturnTemplate.class)
protected WebElement save;
@PageElement(type = ComponentType.INPUT)
protected WebElement firstName;
@PageElement(type = ComponentType.INPUT, fluent = false)
protected WebElement lastName;
@PageElement(type = ComponentType.INPUT, generateAssert = false)
protected WebElement note;
public static class ReturnTemplate extends AbstractPage {
public ReturnTemplate(WebDriver driver) {
super(driver);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment