Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
StartPage
public class StartPage extends Page {
@FindBy(css = "button[data-test=userButton]")
private WebElement userbutton;
@FindBy(css = "a[data-test=logoutButton]")
private WebElement logoutButton;
public StartPage() {
super("http://my-page.se");
}
public void logoutUser() {
System.out.println("Moving to logout-button by first navigating to the user panel");
actions.moveToElement(userPanelbutton)
.moveToElement(logoutButton)
.perform();
System.out.println("Clicking logout");
logoutButton.click();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment