UNEXPECTED_ALERT_BEHAVIOUR using FirefoxOptions for selenium 3.11

14 views
Skip to first unread message

Sayedur Rahman

unread,
May 15, 2018, 4:21:11 PM5/15/18
to Selenium Users

Previously we to UNEXPECTED_ALERT_BEHAVIOUR given below code was fine using DesireCapability.


                        DesiredCapabilities dc = new DesiredCapabilities();
dc.setCapability(CapabilityType.UNEXPECTED_ALERT_BEHAVIOUR, UnexpectedAlertBehaviour.ACCEPT);

In Selenium 3.11 DesireCapability is depricated. ASking to use firefox option.

what would be the code for UNEXPECTED_ALERT_BEHAVIOUR with FirefoxOptions ?

I tried the following: (but didn't work.)
                 FirefoxOptions options = new FirefoxOptions();
options.setUnhandledPromptBehaviour(UnexpectedAlertBehaviour.ACCEPT);



Any one there to help?
Thanks. 
Reply all
Reply to author
Forward
0 new messages