2
votes

This is the screen with the "There is a problem with this website's security certificate." header. Here is the code for the link I'm trying to click:

<tr>
<td >&nbsp;</td>
<td id="continueToSiteAlign" align="left" valign="middle">
    <h4 id="continueToSite">
        <img src="red_shield.png" ID="ImgOverride" border="0" alt="Not recommended icon" class="actionIcon"><A href='' ID="overridelink" NAME="overridelink" >Continue to this website (not recommended).</A>
    </h4>
    </td>
</tr>

In IE8 with watir, the code browser.link(:text => /Continue/).click worked fine to click through the screen, but this is not the case in IE9. Instead, I get NoMethodError: undefined method 'map' for nil:NilClass.

2

2 Answers

1
votes

See my response to my own version of this question: How can we get Watir-Webdriver to work with the IE invalid cert screen?

In short, it appears that IE9 is handling this via a special page that disables most access to JavaScript and anything that a hacker might use on a malware site to automate their way around the warning. The way webdriver works is apparently close enough to what a hacker might try to do that it is also blocked in the same way.

The best solution is just to add the source of the self-signed certificates to your trusted root certification authorities so that IE will see the cert as trusted and not complain. The resulting experience more closely parallels what a real user would see when accessing a real production site with a valid certificate issued by a trusted cert authority.

0
votes

If it helps at all, its not a popup window in IE9 like it was in IE8. In 8, I handled it like any other popup, using driver.getwindowhandles() and throw that into a set, and a set of more than 1 said I had an unexpected popup. In 9, I cant figure out what it is yet because my set is still only 1 for the main window. It appears to be an ajaxy or scripty inline pop, but it is part of the browser. Searching elements on the page for it fails, and looking for new page handles fails also, its very elusive at the moment.