Skip to content

Commit

Permalink
Ensure send keys action checks input
Browse files Browse the repository at this point in the history
  • Loading branch information
shs96c committed Oct 4, 2017
1 parent 45f0478 commit bdc5c5f
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import org.openqa.selenium.interactions.internal.Locatable;

import java.util.List;
import java.util.Objects;

/**
* Sending a sequence of keys to an element.
Expand All @@ -40,6 +41,10 @@ public SendKeysAction(
Locatable locationProvider,
CharSequence... keysToSend) {
super(keyboard, mouse, locationProvider);

if (keysToSend == null) {
throw new IllegalArgumentException("Keys should be a not null CharSequence");
}
this.keysToSend = keysToSend;
}

Expand Down

0 comments on commit bdc5c5f

Please sign in to comment.