WebPagetest Forums
Basic scripting now available for Chrome - Printable Version

+- WebPagetest Forums (https://www.webpagetest.org/forums)
+-- Forum: WebPagetest (/forumdisplay.php?fid=7)
+--- Forum: Announcements (/forumdisplay.php?fid=8)
+--- Thread: Basic scripting now available for Chrome (/showthread.php?tid=713)



Basic scripting now available for Chrome - pmeenan - 04-26-2011 07:14 AM

We just pushed some basic scripting support for the experimental Chrome agent. The following commands are supported: navigate, logData, setDns, setDnsName.

That should be enough for doing navigation-path testing or dev testing of production sites. If there are other commands you use on a regular basis let us know and we'll prioritize them as we work through the scripting implementation. Next up will probably be the form-elements so that you can automate logins and rich application interactions.

Thanks,

-Pat


RE: Basic scripting now available for Chrome - aaronpeters - 04-26-2011 04:41 PM

Great Pat.

Please add:
combineSteps, click, sleep


RE: Basic scripting now available for Chrome - pmeenan - 05-04-2011 10:32 AM

combineSteps, sleep, exec and execAndWait are now live. I'll be adding setCookie tomorrow and then I'll probably work on packaging up the release (I will probably have to tackle click after the release but exec is kind of a hammer that you can use for anything so it might work as a work-around).

Here is a sample script:

combineSteps
navigate http://www.gogle.com
exec document.body.innerHTML='<h1>And now for the NEWS...</h1>'
sleep 5
navigate news.google.com

And the result:

http://www.webpagetest.org/video/compare.php?tests=110504_BG_1d1af57ee5bf96a6cee4a2957b8b1342-r:1-c:0

I'll also start working with the different location owners to deploy Chrome to some of the other agents now that it's pretty stable (and the update mechanism is working well).


RE: Basic scripting now available for Chrome - aaronpeters - 05-04-2011 10:35 AM

Nice!


RE: Basic scripting now available for Chrome - pmeenan - 05-05-2011 05:34 AM

ok, setCookie is now live as well.

I'll start packaging things up for distribution now (and give it a couple of days just to make sure there aren't any big issues). Release should be ready on Friday.