Exemplo n.º 1
0
 public void SearchCaseThree(string from, string to, string numberOfPassangers, string departDate)
 {
     Pages.HomePage homePage = new Pages.HomePage(driver);
     homePage.OpenPage();
     homePage.SearchInOnePlace(from, to, numberOfPassangers, departDate);
     foreach (var windowHandle in driver.WindowHandles)
     {
         if (windowHandle != driver.CurrentWindowHandle)
         {
             driver.SwitchTo().Window(windowHandle);
             IWebElement dynamicElement = (new WebDriverWait(driver, TimeSpan.Parse("60"))).Until(ExpectedConditions.ElementExists(By.Id("view-itinerary")));
             Assert.IsTrue(dynamicElement.Text.Contains("Hide"));
         }
     }
 }