Just follow
2 steps to make selenium accept the SSL certificated
1. Start your Selenium RC server using the following command
java -jar selenium-server.jar -trustAllSSLCertificates
For Firefox
2. use firefoxproxy instead of *firefox
For Internet Explorer
2. use iexploreproxy instead of *iexplore
An extra step is required for proxying SSL content with Internet Explorer. Selenium bundles a special certification authority (CA) certificate that is used to trust all the other SSL certificates.
Installing the CyberVillains Certificate on Windows
The CyberVillains certificate is bundled in the most recent Selenium RC releases in SSLSupport folder. If you download the distribution and extract it, you should be able to get going starting with Figure 1. In the explorer address bar in Figure 1 you can see where to find the certificate.
Figure 1
Double-click the CyberVillains certificate in the selenium server distribution(Refer above Image)
Click on Install Certificate Button
Click on Next Button
Select the radio button "Place all certificates in the following store"
Select Trusted Root CertificationAuthorities folder
Click on Finish button
Accept Security warning
this is one of the best guides to installing ssl certificates i have come accross, the visual guide is very helpful for those who are less technical.
ReplyDeleteThanks kiran, for this wonderfull post on installing ssl certificate. It worked out well for me. I request you to help me in solving this problem. Instead of running
ReplyDeleteselenium server in cmd prompt using "-trustAllSSLCertificates" parameter, is it possible to start the selenium server with "-trustAllSSLCertificates" parameter in
eclipse code. I tried it with the code below, but its not working. I still get the certification error when I run my script. The code snippet is given below
public class netTeller2 {
private static final String BASE_URL = "https://www.google.com";
private Selenium selenium = new DefaultSelenium("localhost", 4444, "*firefoxproxy", BASE_URL);
private SeleniumServer seleniumServer;
@BeforeClass
public void setUp() throws Exception
{
RemoteControlConfiguration rc = new RemoteControlConfiguration();
rc.trustAllSSLCertificates();
seleniumServer = new SeleniumServer(rc);
seleniumServer.start();
selenium.start();
selenium.windowMaximize();
selenium.windowFocus();
selenium.setTimeout("60000");
}
Thanks a ton, kiran... I got the answer for my question in one of your other posting, http://kirankanumuri.blogspot.com/2010/09/programatically-starting-selenium.html
ReplyDeleteHi Kiran,
ReplyDeleteThe description is nice.However,the recent Selenium RC 2.2.0 comes alone with a jar file.I tried to start the server with -trustAllSSLCertificates but failed. Could you please tell me elaborately how to achive this with a successful installation of SSL certificates?
Thanks
Alok
Hi Kiran its really good but is not working for firefox for me. Any idea.
ReplyDeleteWhich version of FF are you using ?
DeleteWhere should I mention use "firefoxproxy instead of *firefox" ??? Please tell me
DeleteThe best and simple tutorial..........great....It works fine for me...
ReplyDeleteHi Kiran,
ReplyDeletethanks for your manual. it helps me, when I start my test from Eclipse. I also tried run all test by maven. I still have problem run it in IE (window is open, but with error that pop up is maybe enabled - is not). When i tried it open by firexor, it still ask for me accpet security certificates. can you help me with my problem? Do you have some experience with it? Thanks a lot. Zuzi
Is there any difference between Left click and Right ? How to Handle Right click Menu options with Selenium RC?
ReplyDeleteI got an automation for validate broken links, but Selenium with java throw me this error all the time:
ReplyDeletejavax.net.ssl.SSLHandshakeException: java.security.cert.CertificateException: No name matching XXX.XXXXXX.XXXX found.
And I implement my server and selenium like this:
RemoteControlConfiguration rcc = new RemoteControlConfiguration();
rcc.setTrustAllSSLCertificates(true);
SeleniumServer server = new SeleniumServer(rcc);
server.start();
selenium = new DefaultSelenium("localhost", 4444, "*firefoxproxy", "https://mypage.com");
The page of the certificate do not appear, but when Selenium go to validate the first link, sent me that error and the progrm ends.
Could you please Help me?
I have an issue with the cybervillains certificate. I am using selenium-server-standalone-2.28.0.jar. I have installed certificate on Windows 7, Fedora Linux, Windows Xp. However, the certificate is working on Windows 7 and Fedora Linux. In Windows Xp, the certificate is unable to open https sites on Google Chrome 24 browser.
ReplyDeleteThe Error logged is untrusted site, please provide proper certificate.
Is there any changes to be made on the browser side to make https sites work.
Please provide workarounds. Thanks in advance.
does anybody know how it works with Selenium Webdriver and Java?
ReplyDeletecapabilities.setCapability(CapabilityType.ACCEPT_SSL_CERTS, true);
seems not to work.
Erna Tercero, for validation of broken links I would recommend this API 'LinkChecker' https://code.google.com/p/linkchecker/.Use this api and make calls with in your Selenium or Java code.
ReplyDeleteGreat blog..
ReplyDeleteThanks for Sharing this useful information amazing blog, It's help to know about the Selenium Certification and importance of Selenium ...