Friday, February 1, 2008

Selenium HTTPS support

Selenium developers suggest four experimental launchers for testing SSL-enabled web pages. Two of them(*chrome and *iehta) work as a proxy and since https doesn't let you simply spoof http headers, Selenium issues its own certificate you have to trust (you can find it inside sslSupport folder of Selenium distributive).
Another two launchers (*pifirefox and *piiexplore) access SSL-enabled web pages directly. In this case there is one trouble consisting in necessity of closing warning messages about authenticity of server certificate (sure, it is supposed that you didn't get a certificate from public authorized CA). Obviously, doing this manually is not accessible.

I see two possible ways to solve this flaw:
1) Create your own CA, issue a certificate for your server and add this CA cerificate to public trusted CA's list on a client PC.
2) This method is more forced and I wouldn't recommend you to choose it, but maybe sometimes it can be a last resort. Moreover, it's platform-specific. For example, for windows you code a program (C++, WinAPI) that finds a warning windows by its title and sends a "close" message to it.

No comments: