Skip to content

Instantly share code, notes, and snippets.

Created June 11, 2018 21:30
What would you like to do?
public void TradeMe_verify_logged_in()
// Find the login input field
AppiumWebElement TradeMe_Login = app.FindElementById("");
// key in your user name
// Find the password field
AppiumWebElement TradeMe_Pwd = app.FindElementById("");
// key in the password
// Find the login button
AppiumWebElement Login_Button = app.FindElementById("");
// Tap the login button
Login_Button.Tap(1, 1);
// Wait for the account menu item to be displayed
WebDriverWait wait = new WebDriverWait(app, TimeSpan.FromSeconds(30));
// Find icon for my account
AppiumWebElement account_icon = app.FindElementByAccessibilityId("Account");
// tap the icon
account_icon.Tap(1, 1);
// confirm that the logout button is visible, this is in turn ensure that the user name isbeing displayed
// find and assert on the text of the user name
AppiumWebElement account_name = app.FindElementById("");
Assert.AreEqual(account_name.Text, "xxxxxx");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment