Is there a way to suppress the warning displayed when accessing sites on HTTPS when using Selenium for automation? I came across the option "-trustAllSSLCertificates", but I wasn't able to get it working. I started my Selenium server the following way:
java -jar selenium-server.jar -trustAllSSLCertificates
... but I still got the security warning. Am I missing some other steps?
I was looking for a programmatic way to do that and I got a nice way to do that which fits perfectly into my automation framework. Here is what I do:
Use Selenium RC Server 2.X (means version 2+), and run the command
java -jar selenium-server-standalone-2.X.X.jar -trustAllSSLCertificates
It is For sure working
Just got it working. Here's how:
In addition to starting the Selenium server with
-trustAllSSLCertificates
option, the browser that is being launched by Selenium should be configured to use the Selenium server as its proxy.For example: If Selenium server is started at host
myselenium.mycompany.com
at the default port4444
, the proxy setting ismyselenium.mycompany.com:4444
. One way to do automate this is to create a Firefox profile and configure the proxy to this address and port, and pass this created profile as an argument when starting the Selenium server using-firefoxProfileTemplate
option.