Example #1
0
        public void CheckAutoRenewNoteIsDisplayedOnContactInfoPageWhenTheUserCheckIt()
        {
            productsPage    = new ProductsPage(CmdDriver.Driver);
            yourOrderPage   = new YourOrderPage(CmdDriver.Driver);
            contactInfoPage = new ContactInfoPage(CmdDriver.Driver);

            extentReportUtils.createATestCase("Check Auto renewal note is displayed on Contact Info page when the user check it");
            extentReportUtils.addTestLog(Status.Info, "CheckAutoRenewNoteIsDisplayedOnContactInfoPageWhenTheUserCheckIt");
            //CmdDriver.NavigateTo("https://store.progress.com/configure-purchase?skuId=6127");

            productsPage.ClickAcceptAllCookies();

            productsPage.ClickBuyNowButtonByProductName(ProductsEnum.DEVCRAFT_ULTIMATE);

            yourOrderPage.ClickAcceptAllCookies();

            // Get product name
            string productName = HelperUtils.GetDescription(ProductsEnum.DEVCRAFT_COMPLETE);

            // Assert there is at least one product at the page
            Assert.AreEqual(1, yourOrderPage.GetProductsCountFromPage());

            // Check Auto Renewal Checkbox
            yourOrderPage.ClickAutomaticalyRenewalCheckbox(productName);

            // Navigate user to the next page - Contact Info Page
            yourOrderPage.ClickContinueButton();

            // Assert Auto Renewal Message Box is displayed
            Assert.IsTrue(contactInfoPage.IsAutoRenewalMessageDisplayed());

            // Click 'Your Account' link
            contactInfoPage.ClickYourAccountLink();

            // Accept cookies
            contactInfoPage.ClickAcceptAllCookies();

            // Check current url
            string url = CmdDriver.Driver.Url.Trim();

            Assert.IsTrue(url.Contains("https://www.telerik.com/login/v2/telerik"));
        }