public void ArrangeTests() { demoQaMainPage = PageFactory.Get <DemoQaPage>(); accordionPage = PageFactory.Get <AccordionPage>(); demoQaMainPage.Load(); demoQaMainPage.OpenAccordionSection(); accordionPage.OpenCustomizeIconsSubSection(); }
public void HoverInputField_VerifyToolTipTextIsCorrect() { //Arrange DemoQaPage demoQaMainPage = PageFactory.Get <DemoQaPage>(); TooltipPage tooltipPage = PageFactory.Get <TooltipPage>(); demoQaMainPage.Load(); demoQaMainPage.OpenTooltipSection(); string expectedTooltipText = "We ask for your age only for statistical purposes."; //Act tooltipPage.HoverInputField(); string tooltipText = tooltipPage.Tooltip.Text; //Assert Assert.IsTrue(tooltipPage.Tooltip.Displayed); Assert.AreEqual(expectedTooltipText, tooltipText); }
public void ChooseDate_ChangeFormatOption_VerifyDateValueIsCorrect(string[] expectedDateFormats) { //Arrange DemoQaPage demoQaMainPage = PageFactory.Get <DemoQaPage>(); CalendarPage calendarPage = PageFactory.Get <CalendarPage>(); DatePickerPage datepickerPage = PageFactory.Get <DatePickerPage>(); demoQaMainPage.Load(); demoQaMainPage.OpenDatePickerSection(); datepickerPage.OpenFormatDateSubSection(); datepickerPage.ClickDateInputField(); //Act calendarPage.EnterDate(); IEnumerable <string> dateFormats = datepickerPage.GetDateFormats(); //Assert CollectionAssert.AreEqual(expectedDateFormats, dateFormats); }
public void MoveSlider_InputIncreasesRespectively() { //Arrange DemoQaPage demoQaMainPage = PageFactory.Get <DemoQaPage>(); SliderPage sliderPage = PageFactory.Get <SliderPage>(); demoQaMainPage.Load(); demoQaMainPage.OpenSliderSection(); //Act for (int position = 1; position <= 10; position++) { sliderPage.MoveSliderTo(position); sliderPage.DelayForSeconds(0.25); int sliderPositionValue = sliderPage.AmountBarValue(); //Assert Assert.AreEqual(position, sliderPositionValue); } }