WebPagetest Forums
Test Timeoust With JavaScript Polling - Printable Version

+- WebPagetest Forums (https://www.webpagetest.org/forums)
+-- Forum: WebPagetest (/forumdisplay.php?fid=7)
+--- Forum: Bugs/Issues (/forumdisplay.php?fid=10)
+--- Thread: Test Timeoust With JavaScript Polling (/showthread.php?tid=12673)



Test Timeoust With JavaScript Polling - thelukemccarthy - 11-23-2013 12:18 AM

Hi

I have just setup a private instance of WebPageTest and I have been trying out the scripting.

The problem I have is some of the pages I'm testing use javascript polling. This means WebPageTest doesn't know when the page has finished loading and the test times out and no data is returned.

Does anyone who or a way to get around this?

The script I have written is as follows

Code:
logData    0
navigate    https://www.somesite/login

setValue    name=UserName    user
setValue    name=Password    letmein

logData    1
click    id=loginSubmit
sleep    2

logData    0
sendClickAndWait    id=LogOutButton

Luke


RE: Test Timeoust With JavaScript Polling - andydavies - 11-23-2013 02:31 AM

Have you tried using setActivityTimeout to increase the timeout value?

https://sites.google.com/a/webpagetest.org/docs/using-webpagetest/scripting#TOC-setActivityTimeout

Or if it's just for one step setTimeout might do the trick for you:

https://sites.google.com/a/webpagetest.org/docs/using-webpagetest/scripting#TOC-setTimeout


RE: Test Timeoust With JavaScript Polling - thelukemccarthy - 12-06-2013 02:09 AM

Hi Andy

Thanks for the answer but that doesn't seem to work.
The setActivityTimeout doesn't work because the page is always active due to the polling.
The setTimeout does make the page timeout, like I want it to, however I don't get and data back. Instead I get and error message where the waterfall diagram should be
"First View: Test Data Missing"

any other ideas?

Luke