Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6816161
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T20:53:33+00:00 2026-05-26T20:53:33+00:00

We’ve probably all seen this screen when testing, all you need is a HTTPS

  • 0

We’ve probably all seen this screen when testing, all you need is a HTTPS site with a self signed cert and you get the “There is a problem with this website’s security certificate” screen, which requires you to click a link to continue.

With Watir this is no problem, I automate the screen as I would any other webpage, clicking the link according to its text or ID value.

With Watir-Webdriver it’s as if nothing inside the HTML can be recognized. and I’m not alone in this See this question

It’s not just trying to click a link, nearly anything you try here will fail on this page Even a simple function such as puts browser.text will return an error.

Selenium::WebDriver::Error::NoSuchElementError: Unable to find element with tag name == body

You can view source, use developer tools, or have the browser element spit out it’s HTML and plainly see the darned body tag right there, but Webdriver is blind to it for some reason.

I don’t know if it is a clue or a red-herring, but I know webdriver uses a ton of XPATH under the hood, and I believe XPATH is case sensitive. and in that regard I see something very unusual when I use puts browser.html against this page, in that every single tag-name is in full upper-case. Somewhat unusual but legal valid HTML in any case. Using browser.html on other pages shows lower case tags. Could this be what is causing webdriver to have so much of a problem with this page?

Does anyone have any bright ideas as to how I might be able to get webdriver to see the link element so I can click it?

Output from the browser object when I ask it for the page HTML

irb(main):019:0> puts $browser.html  #note, indentation is added later for clarity
<HTML dir=ltr>
<HEAD>
<TITLE>Certificate Error: Navigation Blocked</TITLE>
<LINK rel=stylesheet type=text/css href="ErrorPageTemplate.css">
<META name=MS.LOCALE content=EN-US>
<META content="text/html; charset=utf-8" http-equiv=Content-Type>
<META content=Yes http-equiv=MSThemeCompatible>
<SCRIPT language=javascript type=text/javascript src="errorPageStrings.js">
</SCRIPT>
<SCRIPT language=javascript type=text/javascript src="httpErrorPagesScripts.js">
</SCRIPT>
<SCRIPT language=javascript type=text/javascript src="invalidcert.js">
</SCRIPT>
</HEAD>
<BODY onload="BodyLoad(); initMoreInfo('infoBlockID');" class=securityError>
<TABLE border=0 cellSpacing=0 cellPadding=0 width=730>
  <!-- Main title -->
  <TBODY>
  <TR>
    <TD id=shieldIconAlign vAlign=top rowSpan=3 width=60 align=left>
      <IMG id=shieldIcon alt="Shield icon" src="red_shield_48.png"> 
    </TD>
    <TD id=mainTitleAlign vAlign=middle align=left>
      <H1 id=mainTitle>There is a problem with this website's security certificate</H1>
    </TD>
  </TR>
  <TR>
    <TD>
      <H3>
        <DIV id=linkdiv name="linkdiv"></DIV>
      </H3>
    </TD>
  </TR>
  <TR>
  <!-- This row is for the the divider-->
    <TD id=errorCodeAlign class=errorCodeAndDivider align=right>&nbsp;
      <DIV class=divider></DIV>
    </TD>
  </TR>
  <!-- Error Body -->
  <TR>
    <TD></TD>
    <TD>
      <H3>
        <DIV style="DISPLAY: block" id=CertUnknownCA name="CertUnknownCA">
          The security certificate presented by this website was not issued by a trusted certificate authority.
        </DIV>
        <DIV style="DISPLAY: none" id=CertExpired name="CertExpired"></DIV>
        <DIV style="DISPLAY: none" id=CertCNMismatch name="CertCNMismatch"></DIV>
        <DIV style="DISPLAY: none" id=CertRevoked name="CertRevoked"></DIV>
        <NOSCRIPT id=securityCert1></NOSCRIPT><BR>
          <ID id=securityCert2>
            Security certificate problems may indicate an attempt to fool you or intercept any data you send to the server.
          </ID>
      </H3>
    </TD>
  </TR>
  <!-- Recommendation-->
  <TR>
    <TD>&nbsp;</TD>
    <TD><H2 id=recommendation><B>We recommend that you close this webpage and do not continue to this website. </B></H2></TD>
  </TR>
  <!-- close webpage-->
  <TR>
    <TD>&nbsp;</TD>
    <TD id=closeWebpageAlign vAlign=middle align=left>
      <H4 id=closeWebpage>
        <IMG class=actionIcon border=0 alt="Recommended icon" src="green_shield.png">
        <A href="javascript:closePage()">Click here to close this webpage.</A> 
      </H4>
    </TD>
  </TR>
  <!-- continue to site-->
  <TR>
    <TD>&nbsp;</TD>
    <TD id=continueToSiteAlign vAlign=middle align=left>
      <H4 id=continueToSite>
        <IMG id=ImgOverride class=actionIcon border=0 alt="Not recommended icon" src="red_shield.png">
        <A id=overridelink href="http://admanager.qa-prod.local/signups/lead_form" name=overridelink>Continue to this website (not recommended).</A> 
      </H4>
    </TD>
  </TR>
  <!-- InfoBlock -->
  <TR>
    <TD id=infoBlockAlign vAlign=top align=right>&nbsp; </TD>
    <TD id=moreInformationAlign vAlign=middle align=left>
      <H4>
        <TABLE>
          <TBODY>
            <TR>
              <TD vAlign=top>
                <A onclick="javascript:expandCollapse('infoBlockID', true); return false;" href="#">
                  <IMG id=infoBlockIDImage class=actionIcon border=0 alt="More information" src="down.png">
                </A>
              </TD>
              <TD vAlign=top>
                <SPAN id=moreInfoContainer>
                  <A href="javascript:expandCollapse('infoBlockID', true);">More information</A>
                </SPAN>
                <NOSCRIPT></NOSCRIPT>
              </TD>
            </TR>
          </TBODY>
        </TABLE>
      </H4>
      <DIV style="DISPLAY: none" id=infoBlockID class=infoBlock>
        <P>
        <LI id=errorExpl1>If you arrived at this page by clicking a link, check the website address in the address bar to be sure that it is the address you were expecting.
        <LI id=errorExpl2>When going to a website with an address such as https://example.com, try adding the 'www' to the address, https://www.example.com.
          <P></P>
          <P id=moreInfoSeeHelpPF>For more information, see "Certificate Errors" in Internet Explorer Help.
          </P>
        </LI>
      </DIV>
    </TD>
  </TR>
</TBODY>
</TABLE>
</BODY>
</HTML>
=> nil
irb(main):020:0>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T20:53:34+00:00Added an answer on May 26, 2026 at 8:53 pm

    I’ve done a bit of experimenting, including using the HTML I posted to create my own page, sans any JavaScript. If I work with that page, I find it blocks JavaScript actions. In that case, when I try to do things like browser.text, or browser.link.exists?, I see an IE warning popup that tells me that IE is preventing JS from working on that page. (something I never see on the actual cert error page) And in watir-webdriver I get the same errors that I reported. If I click the choice to allow JS, then I can work with the page in watir-webdriver.

    So it appears something in in the very nature of the page is preventing any JS level automation which blocks Webdriver’s access to the page.

    I see why MS is doing this, they don’t want a bogus site to somehow use JavaScript to get around that warning. Apparently the way Watir drives things (via OLE?) isn’t seen as something you could do remotely and thus is allowed access to the page.

    The solution then is to either use Watir for your IE automation, or make it so the certificate is trusted and thus you do not see the warning.

    If you want to use Watir-Webdriver, then you need to add the certificates used on your test servers to the Trusted Root Certification Authorities store. Note NOT the default ‘personal’ store! When adding the cert, you need to change where it’s going to put the cert or you are basically only doing a one time for that session authorization. There will be a warning that now all certificates from that authoritiy will be trusted. I would use this with great care, only on test systems, and only for trusting certs from your own internal test servers.

    It’s pretty easy to do this after manually proceeding to the page, via double-clicking the red warning reminding you the cert is invalid. If you’ve done that right, you can close the browser, re-open, do your navigation and not get an error.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
link Im having trouble converting the html entites into html characters, (&# 8217;) i
For some reason, after submitting a string like this Jack’s Spindle from a text
this is what i have right now Drawing an RSS feed into the php,
I have a French site that I want to parse, but am running into
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString
I need to clean up various Word 'smart' characters in user input, including but
I have a text area in my form which accepts all possible characters from
Does anyone know how can I replace this 2 symbol below from the string

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.