- Notifications
You must be signed in to change notification settings - Fork 781
Description
Selenium allows arguments to be passed along with JavaScript that can be referenced in the script using the injected List variable named arguments. Execute Javascript, Execute Async Javascript, and Wait For Condition do not support this feature. This would be useful for passing WebElements and data structures into scripts
When we implement Get Webelement(s), people will naturally want to pass the WebElements as argument(s) to a script. Currently, one can use Assign Id To Element to make a WebElement easy to reference if JS if it is difficult to reference is JS.
Implementing this without breaking test cases or adding keywords would require using keyword arguments for Execute Javascript and Execute Async Javascript. Because they have variable arguments, we cannot add a positional argument. Keyword arguments require RF 2.8 to work.
There is a workaround for this missing functionality on StackOverflow