public void CheckVatIdIsNotRequiredField() { productsPage = new ProductsPage(CmdDriver.Driver); yourOrderPage = new YourOrderPage(CmdDriver.Driver); contactInfoPage = new ContactInfoPage(CmdDriver.Driver); orderSummaryPage = new OrderSummaryPage(CmdDriver.Driver); extentReportUtils.createATestCase("Check Vat id is not a required field"); extentReportUtils.addTestLog(Status.Info, "CheckVatIdIsNotRequiredField"); productsPage.ClickAcceptAllCookies(); // Click on Buy Now button per Product name productsPage.ClickBuyNowButtonByProductName(ProductsEnum.DEVCRAFT_UI); yourOrderPage.ClickAcceptAllCookies(); // Assert there is at least one product at the page Assert.AreEqual(1, yourOrderPage.GetProductsCountFromPage()); // Navigate user to the next page - Contact Info Page yourOrderPage.ClickContinueButton(); ContactInfo contactInfo = new ContactInfo(); contactInfo.Address.Country = "Bulgaria"; contactInfo.Address.City = "Sofia"; contactInfo.Address.ZipCode = "1000"; contactInfo.VatId = ""; // Fill Billing Information contactInfoPage.FillBillingInformation(contactInfo); // Assert error message for vat id is NOT displayed Assert.IsFalse(contactInfoPage.IsVatIdErrorMessageDisplayed()); // Navigate user to next page contactInfoPage.ClickContinueButton(); // Assert at Order summary page Assert.AreEqual("Order Summary", orderSummaryPage.GetHeaderText()); }