Skip to content

Commit c0a101f

Browse files
committed
Add Keys.chord(Iterable<CharSequence>) as a utility method.
Fixes issue #3991
1 parent e59594f commit c0a101f

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717

1818
package org.openqa.selenium;
1919

20+
import java.util.Arrays;
21+
2022
/**
2123
* Representations of pressable keys that aren't text. These are stored in the Unicode PUA (Private
2224
* Use Area) code points, 0xE000-0xF8FF.
@@ -142,6 +144,13 @@ public String toString() {
142144
* Issue: http://code.google.com/p/webdriver/issues/detail?id=79
143145
*/
144146
public static String chord(CharSequence... value) {
147+
return chord(Arrays.asList(value));
148+
}
149+
150+
/**
151+
* @see #chord(CharSequence...)
152+
*/
153+
public static String chord(Iterable<CharSequence> value) {
145154
StringBuilder builder = new StringBuilder();
146155

147156
for (CharSequence seq : value) {

0 commit comments

Comments
 (0)