Make script work with HtmlUnitDriver as well