Convenience functions for working with WebDriver in Javascript