Created
January 17, 2016 09:54
-
-
Save slawekradzyminski/59be691e2a340d40134e to your computer and use it in GitHub Desktop.
This file contains 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
package org.fluentlenium.sample.pages; | |
import org.fluentlenium.core.FluentPage; | |
/** | |
* Created by s.radzyminski on 10/01/16. | |
*/ | |
public class FacebookLoggedOutPage extends FluentPage { | |
@Override | |
public String getUrl() { | |
return "https://www.facebook.com"; | |
} | |
private static final String WAITER_SELECTOR_AFTER_LOGIN = ".mentionsTextarea"; | |
private static final String LOGIN_FIELD = "#email"; | |
private static final String PASS_FIELD = "#pass"; | |
private static final String SIGN_IN_BUTTON = "#loginbutton"; | |
public void login(String email, String password) { | |
fill(LOGIN_FIELD).with(email); | |
fill(PASS_FIELD).with(password); | |
find(SIGN_IN_BUTTON).first().click(); | |
} | |
public void verifySuccessfulLogin() { | |
await().until(WAITER_SELECTOR_AFTER_LOGIN).areDisplayed(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment