public void SetUp() { externalAccessResult = new Chrome_ExternalAccessVerification(driver, log, executor, iWait); // Creating a object for calling IETTVWebPortal project objAdminVideoManagement = new Chrome_VideoManagement(driver, log, executor, iWait); videoResult = new Chrome_VideoManagementVerification(driver, log, executor, iWait); appURL = st.Chrome_Setup(driver, log, executor); // Calling Chrome Setup }
public void SetUp() { objAdminVideoMngmnt = new Chrome_VideoManagement(driver, log, executor, iWait); objWebVideoMngmnt = new Chrome_VideoManagementVerification(driver, log, executor, iWait); objWebUserGenContent = new Chrome_UserGeneratedContentVerification(driver, log, executor, iWait); // Creating a object for calling IETTVWebPortal project appURL = st.Chrome_Setup(driver, log, executor); // Calling Chrome Setup }
public void SetUp() { videoResult = new Chrome_VideoManagementVerification(driver, log, executor, iWait); // Creating a object for calling IETTVWebPortal project appURL = st.Chrome_Setup(driver, log, executor); // Calling Chrome Setup }
void RejectVideoFunctionalityTest(string vidName) { objVidMngmntVer = new Chrome_VideoManagementVerification(driver, log, executor, iWait); iWait.Until(ExpectedConditions.ElementIsVisible((OR.GetElement("VideoRequestByUser", "VideoBoookingList", "TVAdminPortalOR.xml")))); IList <IWebElement> videoRowList = (IList <IWebElement>)driver.FindElement((OR.GetElement("VideoRequestByUser", "VideoBoookingList", "TVAdminPortalOR.xml"))).FindElements(By.TagName("tr")); browserType = uf.getRunningBrowser(driver, driver.FindElement(By.TagName("html"))); Boolean flag = false; int i = 0; foreach (IWebElement currentRow in videoRowList) { //Check Row that have class="GridRowStyle" or class="AltGridStyle" if (currentRow.GetAttribute("class").Equals("GridRowStyle") || currentRow.GetAttribute("class").Equals("AltGridStyle")) { String columData = currentRow.FindElements(By.TagName("td"))[3].FindElement(By.TagName("span")).Text.Trim(); log.Info("Video Title from manage page::" + columData); if (columData.Equals(vidName)) { //Click on Reject button IWebElement rejectButton = driver.FindElement(OR.GetElement("VideoRequestByUser", "RejectButton", "TVAdminPortalOR.xml", i)); rejectButton.Click(); iWait.Until(ExpectedConditions.ElementIsVisible((OR.GetElement("VideoRequestByUser", "WarningYesButton", "TVAdminPortalOR.xml")))); driver.FindElement((OR.GetElement("VideoRequestByUser", "WarningYesButton", "TVAdminPortalOR.xml"))).Click(); iWait.Until(ExpectedConditions.ElementIsVisible((OR.GetElement("SeriesManagement", "SuccessOkButton", "TVAdminPortalOR.xml")))); driver.FindElement((OR.GetElement("SeriesManagement", "SuccessOkButton", "TVAdminPortalOR.xml"))).Click(); #region Checking Video Status at Web end uf.SwitchToWebTab(driver, browserType); log.Info("Switched Back to webportal"); driver.Navigate().Refresh(); uf.isJqueryActive(driver); IWebElement tblVideoBookingReqListing = driver.FindElement((OR.GetElement("VideoRequestByUser", "VideoBookingList", "TVAdminPortalOR.xml"))); iWait.Until(ExpectedConditions.PresenceOfAllElementsLocatedBy(By.TagName("tr"))); //IList<IWebElement> userContentRowList = (IList<IWebElement>)tblVideoBookingReqListing.FindElements(By.TagName("tr")); IList <IWebElement> userContentRowList = (IList <IWebElement>)driver.FindElements(By.CssSelector("table#myRequestTable > tbody > tr")); int j = 0; int counter = 0; foreach (IWebElement currentRow1 in userContentRowList) { if (counter >= 1) { String columData1 = currentRow1.FindElements((OR.GetElement("VideoRequestByUser", "ColumnData", "TVAdminPortalOR.xml")))[1].Text.Trim(); if (columData1.Equals(vidName)) { Assert.AreEqual("Rejected", currentRow1.FindElements((OR.GetElement("VideoRequestByUser", "ColumnData", "TVAdminPortalOR.xml")))[4].Text.Trim()); break; } j++; } else { counter++; } } #endregion uf.scrollUp(driver); Thread.Sleep(5000); objVidMngmntVer.searchVideo(vidName); Console.WriteLine("Search the rejected video::"); //verifying the video with no result found String NoResultFound = driver.FindElement((OR.GetElement("VideoLandingPage", "SpanResult", "TVWebPortalOR.xml"))).Text; Assert.AreEqual("No result found", NoResultFound); logOut(); break; } i++; } } }
void View_Create_VideFunctionality(string videoName, string browserType) { objVidMngmntVer = new Chrome_VideoManagementVerification(driver, log, executor, iWait); IList <IWebElement> videoRowList = (IList <IWebElement>)driver.FindElement((OR.GetElement("VideoRequestByUser", "VideoBoookingList", "TVAdminPortalOR.xml"))).FindElements(By.TagName("tr")); Boolean flag = false; int i = 0; foreach (IWebElement currentRow in videoRowList) { //Check Row that have class="GridRowStyle" or class="AltGridStyle" if (currentRow.GetAttribute("class").Equals("GridRowStyle") || currentRow.GetAttribute("class").Equals("AltGridStyle")) { String columData = currentRow.FindElements(By.TagName("td"))[3].FindElement(By.TagName("span")).Text.Trim(); log.Info("Video Title from manage page::" + columData); if (columData.Equals(videoName)) { flag = true; //View Button and Close the dialogue box //driver.FindElement(By.XPath("//button[@value='View']")).Click(); iWait.Until(ExpectedConditions.InvisibilityOfElementLocated((OR.GetElement("SeriesManagement", "OverlayWait", "TVAdminPortalOR.xml")))); Thread.Sleep(2000); driver.FindElement(By.CssSelector("div table#ContentPlaceHolder1_grdVideoBookingListing tbody tr:nth-child(2) div button")).Click(); Thread.Sleep(2000); iWait.Until(ExpectedConditions.TextToBePresentInElementLocated((OR.GetElement("VideoRequestByUser", "PopUpVideoTitle", "TVAdminPortalOR.xml")), videoName)); //Checking the View Functionality by comparing the video name, Event Name, Event Location and Event Venue. Assert.AreEqual(viewVideoName, driver.FindElement((OR.GetElement("VideoRequestByUser", "PopUpVideoTitle", "TVAdminPortalOR.xml"))).Text); //commented as it is not working - bug //Assert.AreEqual(eventNameToBeVerified, driver.FindElement((OR.GetElement("VideoRequestByUser", "PopUpEventName", "TVAdminPortalOR.xml"))).Text); Assert.AreEqual("Test Location", driver.FindElement((OR.GetElement("VideoRequestByUser", "PopUpLocation", "TVAdminPortalOR.xml"))).Text); Assert.AreEqual("Test Venue", driver.FindElement((OR.GetElement("VideoRequestByUser", "PopUpVenue", "TVAdminPortalOR.xml"))).Text); iWait.Until(ExpectedConditions.ElementIsVisible((OR.GetElement("VideoRequestByUser", "ModalContent", "TVAdminPortalOR.xml")))); driver.FindElement((OR.GetElement("VideoRequestByUser", "CloseButton", "TVAdminPortalOR.xml"))).Click(); Thread.Sleep(2000); guid_Admin = CreateVideFunctionality(videoName); #region Checking Video Status at Web end uf.SwitchToWebTab(driver, browserType); log.Info("Switched Back to webportal"); driver.Navigate().Refresh(); IWebElement tblVideoBookingReqListing = driver.FindElement((OR.GetElement("VideoRequestByUser", "VideoBookingList", "TVAdminPortalOR.xml"))); iWait.Until(ExpectedConditions.PresenceOfAllElementsLocatedBy(By.TagName("tr"))); //IList<IWebElement> userContentRowList = (IList<IWebElement>)tblVideoBookingReqListing.FindElements(By.TagName("tr")); IList <IWebElement> userContentRowList = (IList <IWebElement>)tblVideoBookingReqListing.FindElements(By.CssSelector("table#myRequestTable > tbody > tr")); int j = 0; int counter = 0; foreach (IWebElement currentRow1 in userContentRowList) { if (counter >= 1) { String columData1 = currentRow1.FindElements((OR.GetElement("VideoRequestByUser", "ColumnData", "TVAdminPortalOR.xml")))[1].Text.Trim(); if (columData1.Equals(videoName)) { Assert.AreEqual("Submitted", currentRow1.FindElements((OR.GetElement("VideoRequestByUser", "ColumnData", "TVAdminPortalOR.xml")))[4].Text.Trim()); break; } j++; } else { counter++; } } uf.scrollUp(driver); Thread.Sleep(5000); objVidMngmntVer.searchVideo(videoName); objVidMngmntVer.verifySearchedVideo(videoName, guid_Admin); //logOut(); #endregion break; } i++; } } }