-
-
Save trivial-search/d5917312ca3b9d309379f01548cca594 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
[Test()] | |
public void TradeMe_verify_logged_in_POM() | |
{ | |
// Use a Page Object method to enter user name | |
Trade_Me_PageObject.Enter_UserName("xxxxxx@gmail.com"); | |
// Use a Page Object method to enter password | |
Trade_Me_PageObject.Enter_Password("xxxxxx"); | |
// Use a Page Object method to press log in button | |
Trade_Me_PageObject.Tap_LoginButton(); | |
// explicit wait .. this still needs to be refactored ;) | |
WebDriverWait wait = new WebDriverWait(app, TimeSpan.FromSeconds(30)); | |
wait.Until(ExpectedConditions.VisibilityOfAllElementsLocatedBy(By.Id("nz.co.trademe.trademe:id/menuAccount"))); | |
// Use a Page Object method to click account icon | |
Trade_Me_PageObject.Tap_AccountIcon(); | |
// another explicit wait... this needs to be refactored too | |
wait.Until(ExpectedConditions.VisibilityOfAllElementsLocatedBy(By.Id("nz.co.trademe.trademe:id/buttonLogout"))); | |
// perform an assert on the account name returned by the Page Object class | |
Assert.AreEqual(Trade_Me_PageObject.Return_AccountName_UnderTest(), "sunjeet81_1"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment