Skip to content

Instantly share code, notes, and snippets.

@sthewissen
Last active June 9, 2016 20:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sthewissen/34bf0419d82c1c54e62a6a60b01d79f7 to your computer and use it in GitHub Desktop.
Save sthewissen/34bf0419d82c1c54e62a6a60b01d79f7 to your computer and use it in GitHub Desktop.
LoginPage UI tests for Xamarin
public class LoginPage : BasePage
{
readonly string SignInButton = "SignInButton";
readonly string EmailField = "EmailTextField";
readonly string FullNameField = "FullNameTextField";
public LoginPage() : base("LoginPageIdentifier", "LoginPageIdentifier")
{
}
[Test]
public void Login()
{
app.Tap(FullNameField);
app.EnterText(fullName);
app.DismissKeyboard();
app.Screenshot($"Entered fullname: '{fullName}'");
app.Tap(EmailField);
app.EnterText(email);
app.DismissKeyboard();
app.Screenshot($"Entered email: '{email}'");
app.Tap(SignInButton);
app.Screenshot($"Tapped login");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment