bug(util): webdriver could deadlock

when prepare scripts containing promises are wrapped in a flow.execute