@Override public Object call() throws Exception { Object value; if (args.size() > 0) { value = ((JavascriptExecutor) getDriver()).executeScript(script, args.toArray()); } else { value = ((JavascriptExecutor) getDriver()).executeScript(script); } return new ResultConverter(getKnownElements()).apply(value); }
@Override public Object call() throws Exception { Object value; if (args.size() > 0) { value = ((JavascriptExecutor) getDriver()).executeAsyncScript(script, args.toArray()); } else { value = ((JavascriptExecutor) getDriver()).executeAsyncScript(script); } return new ResultConverter(getKnownElements()).apply(value); }