Example #1
0
        public void RedirectToPricing(string channelName, IETTVAdminPortal.Chrome.Chrome_IndividualChannelPricing icpAdmin)
        {
            log.Info("RedirectToChannelManagement1 started" + " at line:" + new StackTrace(true).GetFrame(0).GetFileLineNumber());

            icpAdmin.RedirectToIndividualChannelPricing();

            Elements rowListNsoup = icpAdmin.GetRowListNsoup();

            log.Info("Getting Channel Name" + " at line:" + new StackTrace(true).GetFrame(0).GetFileLineNumber());

            //String channelName = GetChannelName();

            rowcounter = icpAdmin.FindRequiredChannel(rowListNsoup, channelName);

            VerifyStatusOfElements(icpAdmin);

            //Enter random Archive price value
            string expectedArchive = icpAdmin.GetRandomPrice();
            string expectedFront   = icpAdmin.GetRandomPrice();
            string expectedAll     = icpAdmin.GetRandomPrice();

            log.Info("Updating channel price" + " at line:" + new StackTrace(true).GetFrame(0).GetFileLineNumber());

            UpdatingPrice(expectedArchive, expectedFront, expectedAll, icpAdmin);

            icpAdmin.VerifyBannerMessage();

            icpAdmin.OverlayWait();

            log.Info("verifying updated channel price" + " at line:" + new StackTrace(true).GetFrame(0).GetFileLineNumber());
        }
Example #2
0
        public void TVAdmin_001_BuyChannelFunctionality()
        {
            try
            {
                IETTVAdminPortal.Chrome.Chrome_IndividualChannelPricing icpAdmin = new IETTVAdminPortal.Chrome.Chrome_IndividualChannelPricing(driver, log, executor, iWait);

                log.Info("TVAdmin_001_BuyChannelFunctionality test Started" + " at line:" + new StackTrace(true).GetFrame(0).GetFileLineNumber());

                string categoryName = cf.readingXMLFile("WebPortal", "BuyChannel", "CategoryName", "Config.xml");

                // moving to Channel Management Page
                RedirectToChannelManagement();

                string channelName = CreatePaidChannel(categoryName);

                UpdateProductCode(channelName);

                RedirectToPricing(channelName, icpAdmin);

                objAdminVideoManagement.redirectToVideoManagement();

                objAdminVideoManagement.basicInfoTab();

                String adminSelectedChannel = channelListTab(channelName);

                objAdminVideoManagement.pricingListTab("Subscription");

                objAdminVideoManagement.addcopyright();

                objAdminVideoManagement.uploadBrowseVideo();

                objAdminVideoManagement.finalPublishVideo("normal");

                //waiting for 2.5 minutes as video will be publish after 2minutes from current system time
                Thread.Sleep(150000);

                uf.OpenNewTab(driver);

                log.Info("count ::: " + driver.WindowHandles.Count);

                String browsertype = uf.getRunningBrowser(driver, driver.FindElement(By.TagName("html")));

                uf.SwitchToWebTab(driver, browsertype);

                uf.NavigateWebPortal(cf, driver);

                buyVidVerification.VerifyBuyChannel(objAdminVideoManagement.videoName);

                log.Info("TVAdmin_001_BuyChannelFunctionality test completed" + " at line:" + new StackTrace(true).GetFrame(0).GetFileLineNumber());
            }

            catch (Exception e)
            {
                log.Error(e.Message + "\n" + e.StackTrace + " at line:" + new StackTrace(true).GetFrame(0).GetFileLineNumber());
                Console.WriteLine(e.Message + "\n" + e.StackTrace + " at line:" + new StackTrace(true).GetFrame(0).GetFileLineNumber());

                Assert.AreEqual(true, false);
            }
        }
Example #3
0
        public void SetUp()
        {
            videoResult = new Chrome_BuyVideoVerification(driver, log, executor, iWait);            // Creating a object for calling IETTVWebPortal project

            buyVidVerification = new Chrome_BuyVideoVerification(driver, log, executor, iWait);

            objAdminVideoManagement = new IETTVAdminPortal.Chrome.Chrome_VideoManagement(driver, log, executor, iWait);

            appURL = st.Chrome_Setup(driver, log, executor);                                               // Calling Chrome Setup

            IETTVAdminPortal.Chrome.Chrome_IndividualChannelPricing icpAdmin = new IETTVAdminPortal.Chrome.Chrome_IndividualChannelPricing(driver, log, executor, iWait);
        }
Example #4
0
        //This function verify the status of all elements as per checkbox status
        public void VerifyStatusOfElements(IETTVAdminPortal.Chrome.Chrome_IndividualChannelPricing icpAdmin)
        {
            Boolean checkBoxStatus = icpAdmin.IsElementChecked("ContentPlaceHolder1_GridView1_chkRow_" + rowcounter);


            // Uncheck the CheckBox and Verify the status of all columns

            //Verify the status of checkbox
            if (checkBoxStatus == true)
            {
                //uncheck the checkBox
                checkBox = driver.FindElement(OR.GetElement("BuyChannel", "GridViewCheckRow", "TVAdminPortalOR.xml", rowcounter));
                checkBox.Click();
            }

            //check status of all columns

            //1.checkBox
            Assert.AreEqual(false, icpAdmin.IsElementChecked("ContentPlaceHolder1_GridView1_chkRow_" + rowcounter));

            //2.Archive
            Assert.AreEqual(false, icpAdmin.ArchiveTextField(rowcounter).Enabled);

            //3.Front
            Assert.AreEqual(false, icpAdmin.FrontTextField(rowcounter).Enabled);

            //4.All
            Assert.AreEqual(false, icpAdmin.AllTextField(rowcounter).Enabled);

            //perform check operation on checkbox and verify
            checkBox = driver.FindElement(OR.GetElement("BuyChannel", "GridViewCheckRow", "TVAdminPortalOR.xml", rowcounter));
            checkBox.Click();

            //Archive
            Assert.AreEqual(true, icpAdmin.ArchiveTextField(rowcounter).Enabled);

            //Front
            Assert.AreEqual(true, icpAdmin.FrontTextField(rowcounter).Enabled);

            //All
            Assert.AreEqual(true, icpAdmin.AllTextField(rowcounter).Enabled);
        }
Example #5
0
        public void UpdatingPrice(String expectedArchive, String expectedFront, String expectedAll, IETTVAdminPortal.Chrome.Chrome_IndividualChannelPricing icpAdmin)
        {
            //Enter Archive front price value
            icpAdmin.ArchiveTextField(rowcounter).Clear();
            icpAdmin.ArchiveTextField(rowcounter).SendKeys(expectedArchive);

            //Enter random front price value
            icpAdmin.FrontTextField(rowcounter).Clear();
            icpAdmin.FrontTextField(rowcounter).SendKeys(expectedFront);

            //Enter random All price value
            icpAdmin.AllTextField(rowcounter).Clear();
            icpAdmin.AllTextField(rowcounter).SendKeys(expectedAll);

            icpAdmin.SaveButton().Click();
        }