public void WhenUserClickOnAnyAvailableLinkUnderMediaSalesAsPerSelectedDrillDown() { try { Synchronization.VisibleElement(SelectBrowser.driver, By.XPath("//span[contains(text(),'Month Start')]")); ActivityHomePage.MediaDisplayLink(SelectBrowser.driver).Click(); Thread.Sleep(10000); } catch (Exception ex) { Console.WriteLine("Exception==>" + ex); ScreenshotPage.TakesScreenshotWithDate(@"Screesnhot", System.Drawing.Imaging.ImageFormat.Png); } }
public void WhenUserClickOnTheDownloadLinkForMediaSales() { try { Synchronization.VisibleElement(SelectBrowser.driver, By.XPath("//span[contains(text(),'Month Start')]")); ActivityHomePage.MediaDisplayDownloadLink(SelectBrowser.driver).Click(); test.Log(Status.Pass, "User Clicks on the download link for Media Sales"); //Thread.Sleep(10000); } catch (Exception ex) { Console.WriteLine("Exception==>" + ex); ScreenshotPage.TakesScreenshotWithDate(@"Screesnhot", System.Drawing.Imaging.ImageFormat.Png); } }
public void WhenClickOnTheContentMaintenanceLink() { try { Synchronization.VisibleElement(SelectBrowser.driver, By.XPath("//div[contains(text(),'Content Maintenance')]")); ActivityHomePage.ContentMainLink(SelectBrowser.driver).Click(); test.Log(Status.Pass, "User Clicks on the Content Maintenance link"); // Thread.Sleep(10000); } catch (Exception ex) { Console.WriteLine("Exception==>" + ex); ScreenshotPage.TakesScreenshotWithDate(@"Screesnhot", System.Drawing.Imaging.ImageFormat.Png); } }
public void WhenUserClickOnAnyAvailableLinkUnderPendingRenewals() { try { Synchronization.VisibleElement(SelectBrowser.driver, By.XPath("//span[contains(text(),'(GMI) GLUECKLER METAL INC.')]//preceding::i[1]")); ActivityHomePage.GlueLink(SelectBrowser.driver).Click(); test.Log(Status.Pass, "User Clicks on the download link for Pending Renewals"); //Thread.Sleep(10000); } catch (Exception ex) { Console.WriteLine("Exception==>" + ex); ScreenshotPage.TakesScreenshotWithDate(@"Screesnhot", System.Drawing.Imaging.ImageFormat.Png); } }
public void ThenUserClickOnTheDownloadLinkForPendingRenewals() { try { Synchronization.VisibleElement(SelectBrowser.driver, By.XPath("//div[@class='span12 pending-renewal-gap']//div[@class='widget-header-highlite']/a")); ActivityHomePage.DownloadPendingRenewalsLink(SelectBrowser.driver).Click(); test.Log(Status.Pass, "User Clicks on the download link for Pending Renewals"); //Thread.Sleep(10000); } catch (Exception ex) { Console.WriteLine("Exception==>" + ex); ScreenshotPage.TakesScreenshotWithDate(@"Screesnhot", System.Drawing.Imaging.ImageFormat.Png); } }
public void WhenClickOnDownloadLinkForSPECImplementation() { try { Synchronization.VisibleElement(SelectBrowser.driver, By.XPath("//a[@class='excel-link pull-left']")); ActivityHomePage.DownloadCustomSpeckImplementationLink(SelectBrowser.driver).Click(); test.Log(Status.Pass, "User Clicks on the download link for Custom SPEC Implementation"); //Thread.Sleep(10000); } catch (Exception ex) { Console.WriteLine("Exception==>" + ex); ScreenshotPage.TakesScreenshotWithDate(@"Screesnhot", System.Drawing.Imaging.ImageFormat.Png); } }
public void ThenUserClicksOnTheCustomSPECLink() { try { Synchronization.VisibleElement(SelectBrowser.driver, By.XPath("//span[contains(text(),'# Account')]//following::div[14]//following::div[1]")); ActivityHomePage.CustomSpeckLink(SelectBrowser.driver).Click(); test.Log(Status.Pass, "User Clicks on the Custom SPEC link"); //Thread.Sleep(10000); } catch (Exception ex) { Console.WriteLine("Exception==>" + ex); ScreenshotPage.TakesScreenshotWithDate(@"Screesnhot", System.Drawing.Imaging.ImageFormat.Png); } }
public void WhenUserClickOnCloseButton() { try { Synchronization.VisibleElement(SelectBrowser.driver, By.XPath("//button[@class='btn btn-default pull-right']")); ActivityHomePage.CloseButton(SelectBrowser.driver).Click(); test.Log(Status.Pass, "User Clicks on the close button"); // Thread.Sleep(10000); } catch (Exception ex) { Console.WriteLine("Exception==>" + ex); ScreenshotPage.TakesScreenshotWithDate(@"Screesnhot", System.Drawing.Imaging.ImageFormat.Png); } }
public void ThenUserShouldCheckByDefaultDrillDownInternet_TSpec_TNNIsDisplayingOrNot() { try { Synchronization.VisibleElement(SelectBrowser.driver, By.XPath("//span[contains(text(),'Month Start')]")); bool b = ActivityHomePage.DrillDownDisplay(SelectBrowser.driver).Displayed; test.Info("Internet_TSpec_TNN is displaying on the page."); //Thread.Sleep(10000); //Console.WriteLine(b); } catch (Exception ex) { Console.WriteLine("Exception==>" + ex); ScreenshotPage.TakesScreenshotWithDate(@"Screesnhot", System.Drawing.Imaging.ImageFormat.Png); } }
public void ThenCheckAmountIsMatchingWithTheTotalOfNewPopupWindowOrNot() { try { Synchronization.VisibleElement(SelectBrowser.driver, By.XPath("//h4[@class='ng-binding']")); string s1 = ActivityHomePage.TextAmtCustomSpeck(SelectBrowser.driver).Text; string s2 = ActivityHomePage.TexttotamtCustomSpeck(SelectBrowser.driver).Text; Assert.AreEqual(s1, s2); test.Info("Assert pass successfully for Custom SPEC amount with respect to total amount"); } catch (Exception ex) { Console.WriteLine("Exception==>" + ex); ScreenshotPage.TakesScreenshotWithDate(@"Screesnhot", System.Drawing.Imaging.ImageFormat.Png); } }
public void ThenCheckContentMaintenanceTextIsMatchingWithContentMaintenanceLinkOrNot() { try { Synchronization.VisibleElement(SelectBrowser.driver, By.XPath("//h4[@class='ng-binding']")); string s1 = ActivityHomePage.TextContentMaintenance(SelectBrowser.driver).Text; string s2 = ActivityHomePage.TextWindowContentMaintenance(SelectBrowser.driver).Text; Assert.AreEqual(s1, s2); test.Info("Assert Pass Successfully for Content Maintenance text and Content Maintenance link"); // Console.WriteLine("Assert Pass"); } catch (Exception ex) { Console.WriteLine("Exception==>" + ex); ScreenshotPage.TakesScreenshotWithDate(@"Screesnhot", System.Drawing.Imaging.ImageFormat.Png); } }
public void ThenUserShouldCheckContentTextCustomSPECImplementationWithNewWindowSContentTextCustomSPECImplementation() { try { Synchronization.VisibleElement(SelectBrowser.driver, By.XPath("//h4[@class='ng-binding']")); string s1 = ActivityHomePage.TextSpeckImplementation(SelectBrowser.driver).Text; string s2 = ActivityHomePage.TextWindowSpeckImplementation(SelectBrowser.driver).Text; Assert.AreEqual(s1, s2); test.Info("Assert pass successfully for Content text Custom SPEC Implementation and new opening link after click on it."); //Console.WriteLine("Assert Pass"); } catch (Exception ex) { Console.WriteLine("Exception==>" + ex); ScreenshotPage.TakesScreenshotWithDate(@"Screesnhot", System.Drawing.Imaging.ImageFormat.Png); } }
public void ThenUserShouldCheckContentTextAvailableInTheLinkAndNewWindowUnderPendingRenewals() { try { Synchronization.VisibleElement(SelectBrowser.driver, By.XPath("//div[@class='span12 pending-renewal-gap']//h3")); string s1 = ActivityHomePage.text1(SelectBrowser.driver).Text; SelectBrowser.driver.SwitchTo().Window(SelectBrowser.driver.WindowHandles.Last()); string s2 = ActivityHomePage.text2(SelectBrowser.driver).Text; Assert.IsTrue(s2.Contains(s1)); test.Info("Assert pass successfully for Content text available in the link and new window under Pending Renewals"); //Console.WriteLine("Assert Pass"); } catch (Exception ex) { Console.WriteLine("Exception==>" + ex); ScreenshotPage.TakesScreenshotWithDate(@"Screesnhot", System.Drawing.Imaging.ImageFormat.Png); } }
public void ThenUserCanCompareColumnOfDownloadedXlsxFile() { string pendRenDownXlpath = @"C:\Users\Anuruddha.Tiwari\Downloads\quadrantThree.xlsx"; try { string s1 = ActivityHomePage.BillingNameHeader(SelectBrowser.driver).Text; Assert.IsTrue(ExcelRead.GetCellData(pendRenDownXlpath, @"Pending Renewals", 0, 0).Contains(s1)); test.Info("Assert pass successfully for compare the 1st column header with respect to present header under Pending Renewals"); string s2 = ActivityHomePage.PubCodeHeader(SelectBrowser.driver).Text; Assert.IsTrue(ExcelRead.GetCellData(pendRenDownXlpath, @"Pending Renewals", 0, 1).Contains(s2)); test.Info("Assert pass successfully for compare the 2nd column header with respect to present header under Pending Renewals"); string s3 = ActivityHomePage.ContractEndHeader(SelectBrowser.driver).Text; Assert.IsTrue(ExcelRead.GetCellData(pendRenDownXlpath, @"Pending Renewals", 0, 2).Contains(s3)); test.Info("Assert pass successfully for compare the 3rd column header with respect to present header under Pending Renewals"); string s4 = ActivityHomePage.ContractAmountHeader(SelectBrowser.driver).Text; Assert.IsTrue(ExcelRead.GetCellData(pendRenDownXlpath, @"Pending Renewals", 0, 3).Contains(s4)); test.Info("Assert pass successfully for compare the 4th column header with respect to present header under Pending Renewals"); string s5 = ActivityHomePage.SalesCloseHeader(SelectBrowser.driver).Text; Assert.IsTrue(ExcelRead.GetCellData(pendRenDownXlpath, @"Pending Renewals", 0, 4).Contains(s5)); test.Info("Assert pass successfully for compare the 5th column header with respect to present header under Pending Renewals"); //Console.WriteLine("Assert pass for all 5 headers"); } catch (Exception ex) { Console.WriteLine("Exception==>" + ex); ScreenshotPage.TakesScreenshotWithDate(@"Screesnhot", System.Drawing.Imaging.ImageFormat.Png); } }
public void ThenUserCanCompareHeaderColumnOfDownloadedXlsxFileWithWebPageHeader() { string pendRenDownXlpath = @"C:\Users\Anuruddha.Tiwari\Downloads\quadrantOne.xlsx"; try { string s1 = ActivityHomePage.MonthStartHeader(SelectBrowser.driver).Text; Assert.IsTrue(ExcelRead.GetCellData(pendRenDownXlpath, @"Internet and TSpec sales", 0, 0).Contains(s1)); test.Info("Assert pass successfully for compare the 1st column header with respect to present header under Media Sales"); string s2 = ActivityHomePage.NewHeader(SelectBrowser.driver).Text; Assert.IsTrue(ExcelRead.GetCellData(pendRenDownXlpath, @"Internet and TSpec sales", 0, 1).Contains(s2)); test.Info("Assert pass successfully for compare the 2nd column header with respect to present header under Media Sales"); string s3 = ActivityHomePage.RenewHeader(SelectBrowser.driver).Text; Assert.IsTrue(ExcelRead.GetCellData(pendRenDownXlpath, @"Internet and TSpec sales", 0, 2).Contains(s3)); test.Info("Assert pass successfully for compare the 3rd column header with respect to present header under Media Sales"); string s4 = ActivityHomePage.TotalHeader(SelectBrowser.driver).Text; Assert.IsTrue(ExcelRead.GetCellData(pendRenDownXlpath, @"Internet and TSpec sales", 0, 3).Contains(s4)); test.Info("Assert pass successfully for compare the 4th column header with respect to present header under Media Sales"); //Assert Fail due to mismatch header string s5 = ActivityHomePage.PyFinalHeader(SelectBrowser.driver).Text; string s6 = ExcelRead.GetCellData(pendRenDownXlpath, @"Internet and TSpec sales", 0, 4); bool b = s6.Contains(s5); Console.WriteLine(b); test.Info("Assert Fail for compare the 5th column header with respect to present header under Media Sales"); //Assert.IsTrue(ExcelRead.GetCellData(pendRenDownXlpath, @"Internet and TSpec sales", 0, 4).Contains(s5)); string s7 = ActivityHomePage.RateHeader(SelectBrowser.driver).Text; Assert.IsTrue(ExcelRead.GetCellData(pendRenDownXlpath, @"Internet and TSpec sales", 0, 5).Contains(s7)); test.Info("Assert pass successfully for compare the 2nd column header with respect to present header under Media Sales"); //scrool IWebElement horizontal_scroll = ActivityHomePage.DeltaHeader(SelectBrowser.driver); ScrollHoriZontal.Hover(SelectBrowser.driver, horizontal_scroll); Thread.Sleep(10000); //After scrool string s8 = ActivityHomePage.DeltaHeader(SelectBrowser.driver).Text; Assert.IsTrue(ExcelRead.GetCellData(pendRenDownXlpath, @"Internet and TSpec sales", 0, 6).Contains(s8)); test.Info("Assert pass successfully for compare the 2nd column header with respect to present header under Media Sales"); // Console.WriteLine("Assert pass for all 6 headers"); } catch (Exception ex) { Console.WriteLine("Exception==>" + ex); ScreenshotPage.TakesScreenshotWithDate(@"Screesnhot", System.Drawing.Imaging.ImageFormat.Png); } }