How the page I'm trying to test works is
- Open page
- A button is supposed to be disabled
- An AJAX request that was sent on page load finishes
- The button is enabled
However, when I try to do something like
driver.Navigate().GoToUrl("https://thepage.com");
Assert.IsFalse(driver.FindElement(By.Id("the-button")).IsEnabled());
the problem is that the AJAX request has finished between the first and second lines and therefore I can't properly test that the button is disabled at first. Is there any way to do a Navigate().GoToUrlWithoutWaitingForAnything
or any hack I could use to do this test?
Aucun commentaire:
Enregistrer un commentaire