Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

When do we use setExperimentalOptions in selenium chrome options?

Can someone Please explain me the last two lines of code.I have searched many sites for the answer but there is no clear explanation.

        ChromeOptions options = new ChromeOptions();
        HashMap<String, Object> chromePrefs = new HashMap<String, Object>();
        chromePrefs.put("profile.default_content_settings.popups", 0);
        options.setExperimentalOptions("prefs", chromePrefs);
like image 658
Rahul Avatar asked Nov 16 '25 22:11

Rahul


1 Answers

Sets an experimental option. Useful for new ChromeDriver options not yet exposed through the ChromeOptions API.

It basically allows us to test particular feature before it gets released from Chrome Developers.

Also check- An example is given in this link

like image 63
Chandra Shekhar Avatar answered Nov 18 '25 19:11

Chandra Shekhar



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!