WebPagetest Forums
WPT 2.4 - Configuring wptdriver.ini to support both Chrome and Firefox - Printable Version

+- WebPagetest Forums (https://www.webpagetest.org/forums)
+-- Forum: WebPagetest (/forumdisplay.php?fid=7)
+--- Forum: Private Instances (/forumdisplay.php?fid=12)
+--- Thread: WPT 2.4 - Configuring wptdriver.ini to support both Chrome and Firefox (/showthread.php?tid=5192)



WPT 2.4 - Configuring wptdriver.ini to support both Chrome and Firefox - paynet - 10-15-2011 04:17 AM

I have a private instance of WPT 2.4 and I'm having trouble configuring wptdriver. Is it possible to configure wptdriver.ini so that a single instance of wptdriver can serve requests to execute a WPT test sceario in either Chrome or Firefox?


RE: WPT 2.4 - Configuring wptdriver.ini to support both Chrome and Firefox - pmeenan - 10-15-2011 04:33 AM

Yes. The sample locations.ini and wptdriver.ini from the zip file is already configured to run both Chrome and firefox.

In locations.ini (on the server) you put all of the browsers supported by wptdriver.ini in a single location:

browser=Chrome,Firefox,Firefox 3,Chromium

Then in wptdriver.ini you just need sections that match each of the defined browsers:

[Chrome]
...

[Firefox]
...

[Firefox 3]
...

[Chromium]
...

I have run IE, Chrome, Firefox 3.6 and Firefox 7 all on the same test machine (note, you will need an updated agent if you want to test Firefox < 4, there were some bugs I had to fix after the 2.4 release).


RE: WPT 2.4 - Configuring wptdriver.ini to support both Chrome and Firefox - paynet - 10-15-2011 05:58 AM

(10-15-2011 04:33 AM)pmeenan Wrote:  Yes. The sample locations.ini and wptdriver.ini from the zip file is already configured to run both Chrome and firefox.

In locations.ini (on the server) you put all of the browsers supported by wptdriver.ini in a single location:

browser=Chrome,Firefox,Firefox 3,Chromium

Then in wptdriver.ini you just need sections that match each of the defined browsers:

[Chrome]
...

[Firefox]
...

[Firefox 3]
...

[Chromium]
...

I have run IE, Chrome, Firefox 3.6 and Firefox 7 all on the same test machine (note, you will need an updated agent if you want to test Firefox < 4, there were some bugs I had to fix after the 2.4 release).

Thank you, Sir. I have everything working correctly now!Big Grin


RE: WPT 2.4 - Configuring wptdriver.ini to support both Chrome and Firefox - bbhati - 10-18-2011 09:17 AM

Hi Patrick, I have configured a private instance with Chrome 14. Simple navigation tests are running just fine.The problem is with scripted tests they are taking too long to complete, first and repeat view both are timing out. I increased the time limit in wptdriver.config, but the tests are taking more than 10 minutes to complete. My scripts are using ssl channel.

Here is my wptdriver.ini:
Quote:[WebPagetest]
url=http://wpt-host-ip/
location=myLocation
Key=myKey

[Chrome]
exe="C:\Users\Administrator\AppData\Local\Google\Chrome\Application\chrome.exe"
options='--load-extension="%WPTDIR%\extension" --user-data-dir="%PROFILE%" --new-window --no-proxy-server --no-first-run --no-default-browser-check --enable-experimental-extension-apis'

[Firefox]
exe="C:\Program Files\Mozilla Firefox\firefox.exe"
options='-profile "%PROFILE%" -no-remote'
template=firefox

Could you guess what could be the reason for such a long time to a scripted test completion?
Thanks


RE: WPT 2.4 - Configuring wptdriver.ini to support both Chrome and Firefox - pmeenan - 10-18-2011 10:18 PM

I'd recommend incrementally building up the script from a single navigation command to the full script and see where the problem is coming from. Could be that one of the steps has a bunch of background activity that causes each step to take 1-2 minutes (and maybe you need to force it to stop measuring at onload instead of the default which is until network activity stops).


RE: WPT 2.4 - Configuring wptdriver.ini to support both Chrome and Firefox - bbhati - 10-20-2011 11:42 AM

Hi Patrick,

Thanks for the suggestion!
So, when I started building the script incrementally, the first step itself, which entering the log-in credentials is taking too long. Also, when the script is complete, the window does not close for a long time for the repeat view to begin. Also, I am seeing requests to some domains which are not there in normal operation, for e.g., there are requests being made to godaddy.com and safebrowsing.clients.google.com which I do not see when testing with IE7 or IE8.

Thanks!


RE: WPT 2.4 - Configuring wptdriver.ini to support both Chrome and Firefox - pmeenan - 10-20-2011 10:44 PM

Those are probably for things like SSL certificate revocation checks and other browser features that differ between Chrome and IE.

Any chance the site is available publicly so I could help debug the script or measurement issues (ping me off-board at pmeenan@webpagetest.org)?


RE: WPT 2.4 - Configuring wptdriver.ini to support both Chrome and Firefox - marcelduran - 12-16-2011 12:06 PM

How do I specify which browser to run tests on a multi-browser location using Restful API:
http://private-wpt/runtest.php?url=example.com&f=xml&k=12345&location=LOC_CH_FF_FF3

Assuming LOC_CH_FF_FF3 is running Chrome, Firefox (latest) and Firefox 3.


RE: WPT 2.4 - Configuring wptdriver.ini to support both Chrome and Firefox - pmeenan - 12-17-2011 12:01 AM

LOC_CH_FF_FF3.DSL:Chrome or LOC_CH_FF_FF3:Chrome (depending on if you want to specify connectivity).

sorry, it's kind of ugly but that scheme worked cleanest for the code structure.


RE: WPT 2.4 - Configuring wptdriver.ini to support both Chrome and Firefox - marcelduran - 12-17-2011 11:09 AM

Thanks Patrick, it works!
Do you mind updating the docs (https://sites.google.com/a/webpagetest.org/docs/advanced-features/webpagetest-restful-apis) when you have the time?