コード例 #1
0
        public void CheckBillingInformationWithState()
        {
            productsPage     = new ProductsPage(CmdDriver.Driver);
            yourOrderPage    = new YourOrderPage(CmdDriver.Driver);
            contactInfoPage  = new ContactInfoPage(CmdDriver.Driver);
            orderSummaryPage = new OrderSummaryPage(CmdDriver.Driver);

            extentReportUtils.createATestCase("Check Billing information with state");
            extentReportUtils.addTestLog(Status.Info, "CheckBillingInformationWithState");

            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();

            // Fill Billing Information
            contactInfoPage.FillBillingInformation(contactInfo);

            // Assert Vat field is not displayed
            Assert.IsFalse(contactInfoPage.IsVatIdFieldDisplayed());

            // Navigate user to next page
            contactInfoPage.ClickContinueButton();

            // Assert at Order summary page
            Assert.AreEqual("Order Summary", orderSummaryPage.GetHeaderText());
        }