Reputation: 759
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
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