Created
December 30, 2019 09:32
-
-
Save angelovstanton/4430a36e3b0534511ce3c44b40873d70 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
[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