Skip to content

Instantly share code, notes, and snippets.

@angelovstanton
Created May 24, 2017 14:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save angelovstanton/8d8b82037d0cf633e4a91f357f24fd9c to your computer and use it in GitHub Desktop.
Save angelovstanton/8d8b82037d0cf633e4a91f357f24fd9c to your computer and use it in GitHub Desktop.
using System;
using OpenQA.Selenium;
using OpenQA.Selenium.Support.UI;
namespace HuddlePageObjectsPartialClassesCSharpSeven.ImprovedVersion
{
public partial class BingMainPage
{
private readonly IWebDriver _driver;
private readonly WebDriverWait _driverWait;
private readonly string _url = @"http://www.bing.com/";
public BingMainPage(IWebDriver browser) => _driver = browser;
public BingMainPage(WebDriverWait wait) => _driverWait = wait ?? throw new ArgumentNullException(nameof(wait));
public void Navigate() => _driver.Navigate().GoToUrl(_url);
public void Search(string textToType)
{
SearchBox = textToType;
GoButton.Click();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment