Created
May 1, 2018 20:26
-
-
Save O5ten/13a2c96afb4e02141287d086145e5956 to your computer and use it in GitHub Desktop.
StartPage
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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