Post

1 Star2 Stars3 Stars4 Stars5 Stars
Loading ... Loading ...

By Rafaela Azevedo
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.setJavascriptEnabled(true);
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 !!

Source: http://azevedorafaela.wordpress.com/2013/05/26/desired-capabilities-webdriver-ignore-security-in-browser/

Category: Programming, QA, Test and Automation Stuffs, certificate and security problems, desired capabilities, error certificate, webdriver config

Você também pode querer ler

Comments are off for this post.