executeJavaScript is deprecated, but you can still use it. The replacement is executeJS (which returns a PendingJavaScriptResult you can use for easy asynchronous access to the browser) - you can find this information from the JavaDoc of executeJavaScript as well.