public void ThenUserShouldBeLandedSuccessfullyForReportsPage() { try { Synchronization.VisibleElement(SelectBrowser.driver, By.XPath("//h3[contains(text(),'Reports')]")); Assert.IsTrue(ReportsPage.ReportsText(SelectBrowser.driver).Text.Contains("Reports")); } catch (Exception ex) { Console.WriteLine("Exception==>" + ex); ScreenshotPage.TakesScreenshotWithDate(@"Screesnhot", System.Drawing.Imaging.ImageFormat.Png); } }
public void WhenUserClicksOnTheReportsLink() { try { Synchronization.VisibleElement(SelectBrowser.driver, By.XPath("//span[contains(text(),'Reports')]")); ReportsPage.ReportsText(SelectBrowser.driver).Click(); } catch (Exception ex) { Console.WriteLine("Exception==>" + ex); ScreenshotPage.TakesScreenshotWithDate(@"Screesnhot", System.Drawing.Imaging.ImageFormat.Png); } }