Execute the specified JavaScript if a JavaScript engine was successfully instantiated. If this JavaScript causes the current page to be reloaded (through location="" or form.submit()) then return the new page. Otherwise return the current page.
Please note: Although this method is public, it is not intended for general execution of JavaScript. Users of HtmlUnit should interact with the pages as a user would by clicking on buttons or links and having the JavaScript event handlers execute as needed..
@param sourceCode the JavaScript code to execute @param sourceName the name for this chunk of code (will be displayed in error messages) @param startLine the line at which the script source starts @return a ScriptResult which will contain both the current page (which may be different thanthe previous page and a JavaScript result object.
|
|
|
|