MDL-52899 behat: make PAGE_READY_JS more robust