Skip to content

Commit 50f9bb1

Browse files
committed
Fixing javadoc for JavascriptExecutor, it can return maps. Fixes #3599
1 parent 64ebe72 commit 50f9bb1

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

java/client/src/org/openqa/selenium/JavascriptExecutor.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ public interface JavascriptExecutor {
4848
* <li>For all other cases, a String is returned.</li>
4949
* <li>For an array, return a List&lt;Object&gt; with each object following the rules above. We
5050
* support nested lists.</li>
51+
* <li>For a map, return a Map&lt;String, Object&gt; with values following the rules above.</li>
5152
* <li>Unless the value is null or there is no return value, in which null is returned</li>
5253
* </ul>
5354
*
@@ -59,7 +60,7 @@ public interface JavascriptExecutor {
5960
*
6061
* @param script The JavaScript to execute
6162
* @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.
6364
*/
6465
Object executeScript(String script, Object... args);
6566

@@ -81,6 +82,7 @@ public interface JavascriptExecutor {
8182
* <li>For all other cases, a String is returned.</li>
8283
* <li>For an array, return a List&lt;Object&gt; with each object following the rules above. We
8384
* support nested lists.</li>
85+
* <li>For a map, return a Map&lt;String, Object&gt; with values following the rules above.</li>
8486
* <li>Unless the value is null or there is no return value, in which null is returned</li>
8587
* </ul>
8688
*
@@ -136,7 +138,7 @@ public interface JavascriptExecutor {
136138
*
137139
* @param script The JavaScript to execute.
138140
* @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.
140142
* @see WebDriver.Timeouts#setScriptTimeout(long, java.util.concurrent.TimeUnit)
141143
*/
142144
Object executeAsyncScript(String script, Object... args);

0 commit comments

Comments
 (0)