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); } }