WebPagetest Forums
Running custom javascript code and getting results back from page - Printable Version

+- WebPagetest Forums (https://www.webpagetest.org/forums)
+-- Forum: WebPagetest (/forumdisplay.php?fid=7)
+--- Forum: Feature Suggestions (/forumdisplay.php?fid=9)
+--- Thread: Running custom javascript code and getting results back from page (/showthread.php?tid=12542)



Running custom javascript code and getting results back from page - ygaras - 09-11-2013 01:32 AM

Not sure if I can accomplish what I want to do with with what is available through wpt at the moment. This is a question more than a feature suggestion.

I need to execute some javascript code after a page is loaded then pass a json object to be analyzed with test results. So far I have been using the console to serialize this JS object and reading it back. It seems that getting the console output is only available for Chrome.

First question: Is it possible to get console output for tests run using IE or Firfox?

Second question: Is it possible to accomplish the above with some other feature in WPT I am not aware of that would work for IE and firefox?

Thanks!


RE: Running custom javascript code and getting results back from page - andydavies - 09-11-2013 09:41 PM

Console output should be at the bottom of the screenshots page (but I haven't checked this for a while)


RE: Running custom javascript code and getting results back from page - ygaras - 09-12-2013 12:56 AM

Thanks for your reply.
It seems that the console output only works with Chrome when capture time line is checked or through the api by adding timeline=1.
This is a test using Chrome, with console output:
http://www.webpagetest.org/screen_shot.php?test=130911_QT_KDD&run=1&cached=0
This is a test using Firefox, no console output:
http://www.webpagetest.org/screen_shot.php?test=130911_7Y_KEH&run=1&cached=0


RE: Running custom javascript code and getting results back from page - pmeenan - 09-13-2013 06:03 AM

Yeah, console log only works for Chrome right now. Been planning on adding it for Firefox but it hasn't bubbled up my priority list yet (and IE but I expect IE will be significantly harder).