Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
public class BingMainPage
private readonly IWebDriver driver;
private readonly string url = @"";
public BingMainPage(IWebDriver browser)
this.driver = browser;
PageFactory.InitElements(browser, this);
[FindsBy(How = How.Id, Using = "sb_form_q")]
public IWebElement SearchBox { get; set; }
[FindsBy(How = How.Id, Using = "sb_form_go")]
public IWebElement GoButton { get; set; }
[FindsBy(How = How.Id, Using = "b_tween")]
public IWebElement ResultsCountDiv { get; set; }
public void Navigate()
public void Search(string textToType)
public void ValidateResultsCount(string expectedCount)
Assert.IsTrue(this.ResultsCountDiv.Text.Contains(expectedCount), "The results DIV doesn't contains the specified text.");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment