public Object eval ( String javascriptFunction ) { try { JavascriptExecutor js = ( JavascriptExecutor ) driver ; return js . executeScript ( javascriptFunction ) ; } catch ( NoSuchMethodError | Exception e ) { log . warn ( e ) ; return null ; } }
Executes a provided script and returns the output of that script . If there is an error executing this script a null value will be returned .