public void CheckMessagesWithEmptyRequiredFields() { string notebookName = "Ноутбук Lenovo ThinkPad X1 Carbon Gen 8 (20U90006RT)"; homePage.GetNavigationContainer().ClickToMenuItem("Компьютеры"); NotebooksPage notebooksPage = homePage.GetNavigationContainer().ClickToLinkItem("Ноутбуки"); notebooksPage.EnterPriceFromInput(1200) .EnterPriceToInput(6840) .ClickToInStockCheckbox() .ClickToManufacturerCheckbox("Lenovo") .ClickToRulerLink() .ClickToShowAllLinks() .ClickToNotebookModelCheckbox("IdeaPad L (Lenovo)", "ThinkPad E (Lenovo)", "ThinkPad X (Lenovo)") .ClickToTypeLink() .ClickToNotebookTypeCheckbox("ультрабук") .ClickToShowProductsButton() .CkickToAddToCartButton(notebookName); string priceInNotebookPage = notebooksPage.GetTextFromDiscountPriceLabelLocator(notebookName); ChartPage chartPage = notebooksPage.GetHeader().ClickToChartButton(); string priceInChartPage = chartPage.GetTextFromDiscountPriceLabel(notebookName); Assert.AreEqual(priceInChartPage, priceInNotebookPage, "Prices aren't equal."); bool isDisplayRequiredFields = chartPage.ClickToCheckoutOrderButton() .ClickToConfirmOrderButton() .IsDisplayRequiredFieldsMessage(); Assert.IsTrue(isDisplayRequiredFields, "The required massages haven't existed on page."); }
public void GivenISetThePriceRangeFrom_BYN(int minPrice, int maxPrice) { notebooksPage.EnterPriceFromInput(minPrice); notebooksPage.EnterPriceToInput(maxPrice); }