Exemplo n.º 1
0
 public void TestClickWaitForCondition(By locator)
 {
     _ajaxyControlPage.GreenRadio.Click();
     _ajaxyControlPage.NewLabelText.SendKeys("TestIsPageLoaded");
     _ajaxyControlPage.SubmitButton.ClickWaitForCondition(Driver, ExpectedCondition.ElementExists(locator));
     Assert.AreEqual(true, Driver.ElementExists(locator));
 }
 /// <summary>
 /// Waits for a <see cref="IWebElement"/> to exists in the page DOM
 /// </summary>
 /// <param name="locator">The <see cref="By"/> locator of the <see cref="IWebElement"/></param>
 /// <param name="maxWaitTimeInSeconds">Maximum amount of seconds as <see cref="int"/> to wait for the <see cref="IWebElement"/> to exist</param>
 /// <returns><see langword="true"/> if the <see cref="IWebElement"/> exists; otherwise, <see langword="false"/></returns>
 public static bool WaitUntilExists(this ISearchContext iSearchContext, By locator, int maxWaitTimeInSeconds = GlobalConstants.MaxWaitTimeInSeconds)
 {
     return(iSearchContext.WaitUntil(ExpectedCondition.ElementExists(locator), maxWaitTimeInSeconds));
 }