Here are some tips for debugging your WebPageTest scripts:

  1. Tabs - Scripts should be tab delimited with only some options accepting spaces between values. This is often the main cause of issues, so check your script in an IDE with invisible characters shown to ensure the formatting is correct.
  2. Use - For quickly iterating over script variations use public WebPageTest to run one off tests. This also helps debug if the issue is SpeedCurve related or not. Watch out for tip #1 when copying and pasting scripts back to SpeedCurve though as they must used tabs.
  3. Hidden errors - Many scripts use "logData 0" to hide steps. If you're having issues try removing the "logData 0" command so that you can identify where in the script the test is failing.
  4. Use the "exec" command for manipulating the page rather than the built-in commands like "setValue". The "exec" command runs arbitrary JavaScript, which means you can test and debug the JS in the console of your browser's DevTools before using it in a test script.
  5. Only use the "andWait" version of commands like "execAndWait" when the command will cause a page transition.
  6. Multi-step scripts - SpeedCurve does not yet support extracting waterfall charts from multi-step scripts. Instead use "logData 0" at the beginning of the script and then "logData 1" just before your final step to record just a single step or navigate command.

What to do when a script stops working

If you have a script that used to work, but suddenly stops working, the following tips might help:

  1. Remove the "logData 0" commands and run the script on This will highlight which part of the script is failing.
  2. Run each of the steps in the console of your browser's DevTools. Check that each step produces the desired result.
  3. Check that all of the element selectors used in the script still exist on the page.

Need extra help?

We try to help out where we can, but we don't provide support for deep debugging of WebPageTest scripts. We can recommend WebPageTest consultants who are experts in scripting and can help out if you're interested. Send us a note at and we'll connect you!

Read more:

Did this answer your question?