Skip to content

Commit bdc5c5f

Browse files
committed
Ensure send keys action checks input
1 parent 45f0478 commit bdc5c5f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

java/client/src/org/openqa/selenium/interactions/SendKeysAction.java

+5
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
import org.openqa.selenium.interactions.internal.Locatable;
2525

2626
import java.util.List;
27+
import java.util.Objects;
2728

2829
/**
2930
* Sending a sequence of keys to an element.
@@ -40,6 +41,10 @@ public SendKeysAction(
4041
Locatable locationProvider,
4142
CharSequence... keysToSend) {
4243
super(keyboard, mouse, locationProvider);
44+
45+
if (keysToSend == null) {
46+
throw new IllegalArgumentException("Keys should be a not null CharSequence");
47+
}
4348
this.keysToSend = keysToSend;
4449
}
4550

0 commit comments

Comments
 (0)