Desired capabilities Webdriver – Ignore security in browser

Hello again, I had some codes to show you !

Like this one, when you have some problem with the certificate page, or proxy, or another security problem, you can put this code forĀ initialiseĀ the webdriver. Before you code anything, you have to start the webdriver and config this one, you can use this config for start the webdriver with the config of all security is off.

In this example I use the IE 9 and platform windows like the default browser:

DesiredCapabilities capabilities = new DesiredCapabilities(“Internet Explorer”, “9”, Platform.WINDOWS);
capabilities.setCapability(“ignoreProtectedModeSettings”, true);
capabilities.setCapability(“ensureCleanSession”, true);
capabilities.setCapability(InternetExplorerDriver.INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS, true);
WebDriver driver = new InternetExplorerDriver(capabilities);


Bye bye !!