Created
August 27, 2017 04:46
-
-
Save hatelove/f4b1c956fc267171590a9be1a11d5e93 to your computer and use it in GitHub Desktop.
learning from teaching, web testing with page objects in the better way
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
[TestMethod] | |
public void Test_輸入關鍵字_skilltree_進行搜尋_搜尋結果第一頁應出現skilltree官網的連結() | |
{ | |
//arrange | |
//到google search首頁 | |
var googleSearchPage = new GoogleSearchPage(this); | |
googleSearchPage.Go(); | |
//act | |
//搜尋skilltree | |
var keywords = "skilltree"; | |
googleSearchPage.Search(keywords); | |
//assert | |
//搜尋結果第一頁應存在"https://skilltree.my/"的連結 | |
var googleSearchResultsPage = new GoogleSearchResultsPage(this); | |
var expectedLink = "https://skilltree.my/"; | |
googleSearchResultsPage.FindResults(expectedLink); | |
} |
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
[TestMethod] | |
public void Test_輸入關鍵字_skilltree_進行搜尋_搜尋結果第一頁應出現skilltree官網的連結() | |
{ | |
//到google search首頁 | |
//搜尋skilltree | |
//搜尋結果第一頁應存在"https://skilltree.my/"的連結 | |
new GoogleSearchPage(this) | |
.Go() | |
.Search("skilltree") | |
.Switch<GoogleSearchResultPage>() | |
.ShouldExistedLink("https://skilltree.my/"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment