Rahul
Rahul

Reputation: 759

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);

Upvotes: 4

Views: 17610

Answers (1)

Chandra Shekhar
Chandra Shekhar

Reputation: 664

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

Upvotes: 3

Related Questions