Skip to content

Instantly share code, notes, and snippets.

@angelovstanton
Created December 30, 2019 09:32
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/4430a36e3b0534511ce3c44b40873d70 to your computer and use it in GitHub Desktop.
Save angelovstanton/4430a36e3b0534511ce3c44b40873d70 to your computer and use it in GitHub Desktop.
[TestClass]
[Browser(BrowserType.Chrome, BrowserBehavior.ReuseIfStarted, true)]
public class DemandPlanningTests : WebTest
{
[TestMethod]
[LoadTest]
public void NavigateToDemandPlanning()
{
App.NavigationService.Navigate("http://demos.bellatrix.solutions/");
Select sortDropDown = App.ElementCreateService.CreateByNameEndingWith<Select>("orderby");
Anchor protonMReadMoreButton = App.ElementCreateService.CreateByInnerTextContaining<Anchor>("Read more");
Anchor addToCartFalcon9 = App.ElementCreateService.CreateByAttributesContaining<Anchor>("data-product_id", "28").ToBeClickable();
Anchor viewCartButton = App.ElementCreateService.CreateByClassContaining<Anchor>("added_to_cart wc-forward").ToBeClickable();
sortDropDown.SelectByText("Sort by price: low to high");
protonMReadMoreButton.Hover();
addToCartFalcon9.Focus();
addToCartFalcon9.Click();
viewCartButton.Click();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment