WebPagetest Forums
HTTPS - WPTDRIVER - Printable Version

+- WebPagetest Forums (https://www.webpagetest.org/forums)
+-- Forum: WebPagetest (/forumdisplay.php?fid=7)
+--- Forum: Bugs/Issues (/forumdisplay.php?fid=10)
+--- Thread: HTTPS - WPTDRIVER (/showthread.php?tid=11492)



HTTPS - WPTDRIVER - ddoc - 07-31-2012 11:04 PM

Hi,

I use WPTDRIVER to launch Firefox. If i try to open Firefox manually, and acces to the target webpage, I can notice I need to add a certificate exception. So I do, refresh and it works.

But I notice each time a test is realized by wptdriver a new profile is created in C:\Documents and Settings\myuser\Application Data\webpagetest_profiles\Firefox and Wptdriver try to use it.
So I decide to modify the wptdriver.ini by change
[Firefox]
exe="C:\Program Files\Mozilla Firefox\firefox.exe"
options='-profile "%PROFILE%" -no-remote'
installer=http://www.webpagetest.org/installers/browsers/firefox.dat
template=firefox
By
[Firefox]
exe="C:\Program Files\Mozilla Firefox\firefox.exe"
installer=http://www.webpagetest.org/installers/browsers/firefox.dat
template=firefox
OR by
[Firefox]
exe="C:\Program Files\Mozilla Firefox\firefox.exe"
options='-profile "C:\Documents and Settings\myuser\Application Data\Mozilla\Firefox\Profiles\3s3a1ya1.default" -no-remote'
installer=http://www.webpagetest.org/installers/browsers/firefox.dat
template=firefox

In the two cases, it doesn't work, I try different choices :
one time firefox is launched but no url is browsed
second time firefox is not launched the profil can't be loaded.
I try to copy past for /L %%i in (0,1,100000000000000000000000000000000000000000000000000000) do copy "C:\Documents and Settings\myuser\Application Data\Mozilla\Firefox\Profiles\3s3a1ya1.default\cert_override.txt" "C:\Documents and Settings\myuser\Application Data\webpagetest_profiles\Firefox\cert_override.txt" to copy the cert file but in that case, the process wptdriver is blocked.

Do you have any idea?
Otherwise it's perfectly working without https.

best regards,
Alexandre


RE: HTTPS - WPTDRIVER - pmeenan - 08-01-2012 03:56 AM

Don't try changing the command-line options, that will cause all sorts of things to break. You're best bet is to see if there is something you can change about the default profile stored in templates/firefox that will get Firefox to ignore the errors.

There is a prefs file that has a bunch of preferences that gets installed when Firefox launches. I didn't see any that jumped out - http://kb.mozillazine.org/About:config_entries

It's possible that Firefox imports certs from windows when it first starts up so installing the certs there may work as well. Sorry, not something I've had to deal with yet.


RE: HTTPS - WPTDRIVER - ddoc - 08-01-2012 06:49 PM

Hi,

thank you for your answer.
I take time to try differents other way by read :
http://kb.mozillazine.org/About:config_entries
http://kb.mozillazine.org/Starting_Firefox_or_Thunderbird_with_a_specified_profile
http://kb.mozillazine.org/Profile_folder_-_Firefox#Managing_profiles
http://kb.mozillazine.org/Profile_Manager

So nothing workks, the onlyd thing that makes me happy is the use of the command line Components.classes["@mozilla.org/file/directory_service;1"].getService( Components.interfaces.nsIProperties).get("ProfD", Components.interfaces.nsIFile).path permitting to extract the path of the current profile.

I don't find a right way to modify the default profile, but I notice by using the profile manager and create a new one, the file cert_override.txt is available.
So my assumption is wptdriver creates a new profile based on another configuration, this configuration isn't link to the current firefox configuration.

About your proposition about the cert, yes I agree, I already try to find a way to generate and install a "real" cert because why makecert you can't install like that.

Best regards,
Alexandre