MDL-43173 behat: Thowing an exception if the JS is not ready