SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 7 of 7
  1. #1
    Junior Member
    Join Date
    Jun 2008
    Posts
    10
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Selenium / HTTPS certificate issue

    I seem to be having the same problem lebowski is having. A certificate pops up when I'm trying to start up a selenium RC test. Eyaj suggests starting the server with -proxyInjectionMode, but this isn't working for me. I'm already using the -avoidProxy switch, otherwise none of my open() statements with a path that is a redirect work.

    I have also tried using the -firefoxProfileTemplate switch, but this isn't having any effect either.

    Any ideas here would be appreciated.

    Paul

  2. #2
    Junior Member
    Join Date
    Jun 2008
    Posts
    10
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Selenium / HTTPS certificate issue

    A co-worker and I ended up coming up with a solution for this ourselves:

    Abstract
    ========

    The problem here is to eliminate the certificate pop up at the start of running an RC test.

    These steps have been written using the following software:

    Firefox 2.0.0.14
    Java 1.5
    Selenium RC 0.9.2


    Prerequisites:

    These steps assume the above SW is installed and running.

    Steps:

    Create the proxy.pac file

    Create a new file /proxy.pac, in the correct location for your site, with this contents:

    function FindProxyForURL(url, host) {
    if(shExpMatch(url, '/selenium-server/')) {
    return 'PROXY localhost:4444; DIRECT';
    }
    }

    Create a new firefox profile
    Bring down all sessions of firefox
    from a command window, Type "firefox -P" (the firefox profile window appears)
    Click Create Profile (the create profile window appears)
    Click Next
    Type the new profile name "selenium-https-profile"
    Click Finish
    Click "selenium-https-profile" in the selection list (this sets the profile to use in future sessions)
    Click Exit


    Add the proxy.pac and the cybervillian certificate to the profile
    from a command window, Type "firefox"
    Select Edit|Preferences
    Click Advanced
    Click the Network tab
    under Connections, Click Settings
    Click "Automatic proxy configuration URL"
    Type: https://<localPath>/proxy.pac
    Click OK
    Click Advanced
    Click the Encryption tab
    Click View Certificates
    Click Import
    Search to /selenium/selenium-remote-control-0.9.2/selenium-server-0.9.2/sslSupport/cyberV illiansCA.cer
    Click Open
    Click OK
    Click Close

  3. #3
    Junior Member
    Join Date
    Jan 2009
    Posts
    2
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Selenium / HTTPS certificate issue

    I have tried the same thing but unable to found any solution could you please guide me
    how can i solve this issue.

    Thanks
    Chetan!

  4. #4
    Junior Member
    Join Date
    Apr 2009
    Posts
    11
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Selenium / HTTPS certificate issue

    Hi,

    I also had the same issue, which i were able to resolve using the below mentioned steps.

    1. Close down any running Firefox instances.
    2. Start Firefox (the one you're going to run your tests with) with the profile manager: firefox -ProfileManager
    3. Create a new profile. You'll be prompted to choose a directory for the profile. Put it somewhere inside the project where you're writing the tests.
    4. Select the profile and run Firefox using it.
    5. Browse to the HTTPS URL (with self-signed certificate) you're going to be testing against.
    6. Accept the self-signed certificate when prompted. This creates an exception for it in the profile.
    7. Close the browser.
    8. Go to the Firefox profile directory.
    9. Delete everything in the directory except for the cert_override.txt and cert8.db files.
    10. When you run your Selenium server (like in my Ant example above), pass a -firefoxProfileTemplate /path/to/profile/dir argument to it. This tells Selenium to use your partial profile (with certificate exceptions) as a basis for minting its new profile. So you get the certificate exceptions, but without any of the other clutter you would get if you used a whole profile.

    Please, make sure u have done all the steps properly.
    After the creating the mozilla profile, Start the Selenium RC server with following options,

    -firefoxProfileTemplate <name-of-the-profile-created>

    Hope, this will resolve the issue.

    Namrata
    Namrata Shakya

  5. #5
    Junior Member
    Join Date
    May 2009
    Posts
    1
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Selenium / HTTPS certificate issue

    Hi,

    We resolve the HTTPS certificate issue like this:
    For firefox, there is an add-on: "Remember certificate exception" (https://addons.mozilla.org/en-US/firefox/addon/10246), intall it on firefox and save the profile, use this profile when starting Selenium server.

    For IE, our solution is kinda brute-force: we write a program that runs in background and looks for certificate warning window, and clicks the right button when the window appears. It works fine.

  6. #6
    Member
    Join Date
    Apr 2008
    Location
    London, GB
    Posts
    54
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Selenium / HTTPS certificate issue

    [ QUOTE ]
    Hi,

    We resolve the HTTPS certificate issue like this:
    For firefox, there is an add-on: "Remember certificate exception" (https://addons.mozilla.org/en-US/firefox/addon/10246), intall it on firefox and save the profile, use this profile when starting Selenium server.

    For IE, our solution is kinda brute-force: we write a program that runs in background and looks for certificate warning window, and clicks the right button when the window appears. It works fine.

    [/ QUOTE ]


    You could also...

    For IE run the browser as local host with port 4444 (or another port if 4444 not available) [tools->connections->lan settings]. Also add -trustAllSSLCertificates switch at command line.

    For FF, Namrata's solution above will work. except FF2 does not need cert_override.

  7. #7
    Moderator
    Join Date
    Sep 2001
    Location
    Yankee Land
    Posts
    4,055
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Selenium / HTTPS certificate issue

    Sorry to be bumping up this old one...but I also found that you can deselect Warn about Certificate address mismatch in the IE Tools/Advanced/Security settings. This eliminates the warning page IE will give, I would not recommend this for public machines, only for those internal ones you need to test against.
    - M

    Nothing learns better than experience.

    "So as I struggle with this issue I am confronted with the reality that noting is perfect."
    - Unknown

    Now wasting blog space at QAForums Blogs - The Lookout

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Search Engine Optimisation provided by DragonByte SEO v2.0.36 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 8.57%
vBulletin Optimisation provided by vB Optimise v2.6.4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.2.8 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 08:34 AM.

Copyright BetaSoft Inc.