June 2018
Beginner to intermediate
376 pages
8h 58m
English
This scenario is basically the same as the preceding scenario, but this time the UX team has decided that the drop off point is 15 seconds. So, your explicit wait code now looks like this:
WebDriverWait wait = new WebDriverWait(getDriver(), 15, 500);wait.until(not(presenceOfElementLocated(By.id("loading_image"))));
However, this time the implicit wait inside the driver factory has helpfully been set to 10 seconds. Everything works, so at the time you don't notice any problems; you run your test and it passes, and everything looks fine. The problem is that the animated GIF actually disappeared after 2 seconds, but your test waited the whole 10 seconds set by the implicit wait before it ...
Read now
Unlock full access