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);
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With