Created
May 24, 2017 16:15
-
-
Save angelovstanton/215d4cf25ed62c34e0e11e9b3d9c9a06 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
public partial class BingMainPage | |
{ | |
private readonly IWebDriver _driver; | |
private readonly string _url = @"http://www.bing.com/"; | |
public BingMainPage(IWebDriver browser) | |
{ | |
_driver = browser; | |
} | |
public BingMainPage Navigate() | |
{ | |
_driver.Navigate().GoToUrl(_url); | |
return this; | |
} | |
public BingMainPage Search(string textToType) | |
{ | |
SearchBox.Clear(); | |
SearchBox.SendKeys(textToType); | |
GoButton.Click(); | |
return this; | |
} | |
public BingMainPage ClickImages() | |
{ | |
ImagesLink.Click(); | |
return this; | |
} | |
public BingMainPage SetSize(Sizes size) | |
{ | |
Sizes.SelectByIndex((int)size); | |
return this; | |
} | |
public BingMainPage SetColor(Colors color) | |
{ | |
Color.SelectByIndex((int)color); | |
return this; | |
} | |
public BingMainPage SetTypes(Types type) | |
{ | |
Type.SelectByIndex((int)type); | |
return this; | |
} | |
public BingMainPage SetLayout(Layouts layout) | |
{ | |
Layout.SelectByIndex((int)layout); | |
return this; | |
} | |
public BingMainPage SetPeople(People people) | |
{ | |
People.SelectByIndex((int)people); | |
return this; | |
} | |
public BingMainPage SetDate(Dates date) | |
{ | |
Date.SelectByIndex((int)date); | |
return this; | |
} | |
public BingMainPage SetLicense(Licenses license) | |
{ | |
License.SelectByIndex((int)license); | |
return this; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment