Skip to content

Instantly share code, notes, and snippets.

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/7c8e547520a38bd14f79e92c1878a5fc to your computer and use it in GitHub Desktop.
Save angelovstanton/7c8e547520a38bd14f79e92c1878a5fc to your computer and use it in GitHub Desktop.
public class HealthyDietMenuGeneratorTestsFirefox
{
private IWebDriver _driver;
[TestInitialize]
public void SetupTest()
{
_driver = new FirefoxDriver();
_driver.Manage().Timeouts().PageLoad = TimeSpan.FromSeconds(5);
}
[TestCleanup]
public void TeardownTest()
{
_driver.Quit();
}
[TestMethod]
public void FillAwsomeDietTest_ThroughPageObjects()
{
var healthyDietGeneratorPage = new HealthyDietGeneratorPage(_driver);
_driver.Navigate().GoToUrl(healthyDietGeneratorPage.Url);
healthyDietGeneratorPage.AddAdditionalSugarCheckbox.Click();
healthyDietGeneratorPage.VentiCoffeeRadioButton.Click();
var selectElement = new SelectElement(healthyDietGeneratorPage.BurgersDropDown);
selectElement.SelectByText("7 x BBQ Ranch Burgers");
healthyDietGeneratorPage.SmotheredChocolateCakeCheckbox.Click();
healthyDietGeneratorPage.AddSomethingToDietTextArea.SendKeys(@"Goi cuon- This snack made from pork, shrimp, herbs, rice vermicelli and other ingredients wrapped in rice paper is served at room temperature. It’s “meat light,” with the flavors of refreshing herbs erupting in your mouth.");
healthyDietGeneratorPage.RockStarRating.Click();
healthyDietGeneratorPage.FirstNameTextBox.SendKeys("Anton");
healthyDietGeneratorPage.LastNameTextBox.SendKeys("Angelov");
healthyDietGeneratorPage.EmailTextBox.SendKeys("aangelov@yahoo.com");
healthyDietGeneratorPage.AwsomeDietSubmitButton.Click();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment