Have values for edge driver changed

40 Views Asked by At

We have a framework that has been working for years. When we start Edge (previously IE) we specify unexpectedAlertBehavior:

eOp.setCapability("unexpectedAlertBehaviour", "ignore");
...
driver = new EdgeDriver(eOp);

this has worked but now we are getting

"java.lang.IllegalArgumentException: Illegal key values seen in w3c capabilities: [unexpectedAlertBehaviour]"

same problem if I try upper case:

Illegal key values seen in w3c capabilities: [UnexpectedAlertBehaviour]

Is this no longer valid? Edge (and driver) version 9Version 122.0.2365.92). I am not attaching to IE since this does not need to be run in IE mode. Java version is java-1.8.0-openjdk-1.8.0.332-2.

Is there a new property?

1

There are 1 best solutions below

0
Yu Zhou On BEST ANSWER

unexpectedAlertBehaviour is deprecated. You need to update to W3C Syntax: https://www.selenium.dev/blog/2022/legacy-protocol-support/. You could use unhandledPromptBehavior instead.

eOp.setCapability("unhandledPromptBehavior", "ignore");
...
driver = new EdgeDriver(eOp);