desc.ElementExecuteJavascript.txt Maven / Gradle / Ivy
Executes the given JavaScript code for the given element.
*Examples:*
| Element Execute JavaScript | css=body | arguments[0].innerHTML='hello'; |
| Element Execute JavaScript | css=body | classpath:js/mycode.js |
| Element Execute JavaScript | css=body | http://somedomain/theircode.js |
| Element Execute JavaScript | css=body | arguments[0].innerHTML='hello'; alert(arguments[1] + arguments[2] + arguments[3]); | alvin | - | test |
=>
| Executes the given code, {{arguments[0]}} is the element.
| Executes the given code from project class path {{resource/js/mycode.js}}, {{arguments[0]}} is the element.
| Download and execute the code, {{arguments[0]}} is the element.
| Execute the code, with 4 arguments the {{arguments[0]=css=body}}, {{arguments[1]='alvin'}}, {{arguments[2]='-'}} and {{arguments[3]='test'}}