MDL-39528 behat: Avoid test suite general failure when modal window is detected