@@ -48,6 +48,7 @@ public interface JavascriptExecutor {
48
48
* <li>For all other cases, a String is returned.</li>
49
49
* <li>For an array, return a List<Object> with each object following the rules above. We
50
50
* support nested lists.</li>
51
+ * <li>For a map, return a Map<String, Object> with values following the rules above.</li>
51
52
* <li>Unless the value is null or there is no return value, in which null is returned</li>
52
53
* </ul>
53
54
*
@@ -59,7 +60,7 @@ public interface JavascriptExecutor {
59
60
*
60
61
* @param script The JavaScript to execute
61
62
* @param args The arguments to the script. May be empty
62
- * @return One of Boolean, Long, Double, String, List or WebElement. Or null.
63
+ * @return One of Boolean, Long, Double, String, List, Map or WebElement. Or null.
63
64
*/
64
65
Object executeScript (String script , Object ... args );
65
66
@@ -81,6 +82,7 @@ public interface JavascriptExecutor {
81
82
* <li>For all other cases, a String is returned.</li>
82
83
* <li>For an array, return a List<Object> with each object following the rules above. We
83
84
* support nested lists.</li>
85
+ * <li>For a map, return a Map<String, Object> with values following the rules above.</li>
84
86
* <li>Unless the value is null or there is no return value, in which null is returned</li>
85
87
* </ul>
86
88
*
@@ -136,7 +138,7 @@ public interface JavascriptExecutor {
136
138
*
137
139
* @param script The JavaScript to execute.
138
140
* @param args The arguments to the script. May be empty.
139
- * @return One of Boolean, Long, String, List, WebElement, or null.
141
+ * @return One of Boolean, Long, String, List, Map, WebElement, or null.
140
142
* @see WebDriver.Timeouts#setScriptTimeout(long, java.util.concurrent.TimeUnit)
141
143
*/
142
144
Object executeAsyncScript (String script , Object ... args );
0 commit comments