In my opinion, I'd like to use the percent of keywords of URL to make sure that the page has changed.
Such as I am now at the PropertiesOwnerPage
Then at the search box, I enter the "Morgan House" and then click the search button
BtnSearch.Click();
while (!_driver.Url.Contains("SearchString"))
{
Thread.Sleep(200);
}
return new SearchResultPage();
that means then the BtnSearch clicked, until the page goto the search result page, or it will wait for 200ms and then check the if URL has changed. if it has changed, then move to SearchResultPage
No comments:
Post a Comment