I have an selenium integration test that launches browser and checks the webstore for any broken functionality. However the entire test runs too fast and finishes before I c
You can play with EventFiringWebDriver
.
WebDriver driver = new FirefoxDriver();
EventFiringWebDriver slowDriver = new EventFiringWebDriver(driver);
slowDriver.registerListener(new ListenerThatAddsPauses(5, TimeUnit.SECONDS));
You will have to write your class ListenerThatAddsPauses
which will extend AbstractEventFiringListener
. In ListenerThatAddsPauses
you will have to override methods from parent class and for example add needed pauses. Something like:
@Override
public void beforeClickOn(WebElement element, WebDriver driver) {
Thread.sleep(timeout);
}
Here is a great example