Skip to content

Commit 67202b1

Browse files
committed
Use fallback actions if a deprecated constructor was used.
this.driver may be null if one of the deprecated Actions constructors was used.
1 parent bd4ae61 commit 67202b1

File tree

1 file changed

+6
-0
lines changed
  • java/client/src/org/openqa/selenium/interactions

1 file changed

+6
-0
lines changed

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -627,6 +627,12 @@ private BuiltAction(WebDriver driver, Map<InputSource, Sequence> sequences, Acti
627627

628628
@Override
629629
public void perform() {
630+
if (driver == null) {
631+
// One of the deprecated constructors was used. Fall back to the old way for now.
632+
fallBack.perform();
633+
return;
634+
}
635+
630636
try {
631637
((Interactive) driver).perform(sequences.values());
632638
} catch (ClassCastException | UnsupportedCommandException e) {

0 commit comments

Comments
 (0)