Skip to content

SSL Self signed certificates on https sites. #52

Closed

Description

@honta

Hi.

  1. Is it possible to implement "-trustAllSSLCertificates" switch while importing Selenium2Library.
  2. Is there any option to override ssl error page with Selenium2Library in Internet Explorer. In my environment certificates for tested sites are generated during whole test session. In SeleniumLibrary I was able to click link "Continue to website......", but in Selenium2Library it's not possible any more. Page with ssl error in Internet Explorer is different treated by S2L and in logs there is info:

....
16:42:09.582 INFO Clicking link 'Continue to this website (not recommended).'.
16:42:10.113 FAIL TypeError: object of type 'NoneType' has no len()
....

Activity

  1. j1z0 commented on May 15, 2012

    @j1z0
    Contributor

    @honta,

    Thanks for submitting the issue. Is it possible you can create a small test case to reproduce the problem? Or at least can you post the test that is producing the error, so I can have a better idea of what might be causing this is?

    Thanks,
    Jeremy

  2. honta commented on May 16, 2012

    @honta
    Author

    Hi.
    Below is test case, but clue lays in environment, I'm working in: website which is tested is reinstalled all the time, production goes. After reinstall there are new self-signed certificates generated for Apache. Even if I accept such certificate for IE for one session, after reinstall page with ssl certificate error comes again.
    -TC (using Selenium2Library 1.0, along with Robot Framework 2.7.1):
    .......................
    Open Browser ${target_ip} ${browser}
    Go To ${target_ip}
    Maximize Browser Window
    Login
    .......................
    after execution test case stuck on
    res://ieframe.dll/invalidcert.htm?SSLError=33554432#[here goes my site addres]
    and Selenium waits for login page, which isn't shown. If I try to override IE page with ssl error (click link "Continue to this website (not recommended)."), Selenium2 doesn't "see" that page as clickable and return error below:

    .......................
    Documentation: Takes a screenshot of the current page and embeds it into the log.
    Start / End / Elapsed: 20120516 08:43:58.707 / 20120516 08:43:58.714 / 00:00:00.007
    08:43:58.712 FAIL AttributeError: 'WebDriver' object has no attribute '_execute'
    08:43:58.390 INFO Clicking link '[my addres goes here]'.
    08:43:58.714 WARN Keyword 'Capture Page Screenshot' could not be run on failure: AttributeError: 'WebDriver' object has no attribute '_execute'
    08:43:58.716 FAIL TypeError: object of type 'NoneType' has no len()
    .......................
    You can reproduce this error easly, when for example change date on your computer to make some page certificate invalid. Then try to do s-thg with this page.
    Regards
    Piotr

    ps. Don't pay attention to "screenshot" error :)

  3. PriyaAn commented on Sep 11, 2012

    @PriyaAn

    I am too facing the same issue on IE9.Kindly help me to resolve it asap.

  4. finspin commented on Sep 18, 2012

    @finspin

    I have the same problem as OP. Not able to run tests on IE due to the certificate issue.

  5. Gurud commented on Oct 29, 2012

    @Gurud

    yes, I am also getting same problem...Script gets fail & showing message as-
    WARN Keyword 'Capture Page Screenshot' could not be run on failure: AttributeError: 'WebDriver' object has no attribute '_execute'

  6. cookie314 commented on Mar 5, 2014

    @cookie314

    Hi, Guys, For this issue, I think it's not the selenium issue. A workaround is disable the certificate check on IE. You can set this in IE->Tool->Internet Option->Advanced, disselect the check-box: Warn about certificate address mismatch*.
    That's what I'm doing when testing self assign certificate website in IE.

  7. ombre42 commented on Mar 5, 2014

    @ombre42
    Contributor

    @cookie314 are you sure that is self-signed? The workaround you mentioned will help if the sys admins took the real cert off the production server and put it on a test server. With a self-signed cert, there is no entity in the chain of trust that the client trusts, so it will never trust that cert.

  8. just-be-dev commented on Apr 30, 2015

    @just-be-dev
    Contributor

    Is this still an issue?

  9. ombre42 commented on May 15, 2015

    @ombre42
    Contributor

    I'm sure its still an issue. But I do not think it is one that could or should be solved in this project. The issue even extends beyond automated testing as it is an environmental issue.
    Another workaround is using a proxy server that re-encrypts HTTPS traffic using a certificate that does not change. Fiddler does this but there are probably others.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions