WebPagetest Forums
[split] How to test with a script? - Printable Version

+- WebPagetest Forums (https://www.webpagetest.org/forums)
+-- Forum: WebPagetest (/forumdisplay.php?fid=7)
+--- Forum: Bugs/Issues (/forumdisplay.php?fid=10)
+--- Thread: [split] How to test with a script? (/showthread.php?tid=13768)

[split] How to test with a script? - bigb21985 - 06-10-2015 04:33 AM


By using combineSteps, script gives the result of multiple steps. If I want to capture data only after a button click then neither logdata nor combineSteps is helping.

For example my requirement is

1. Navigate to login page and login with valid credentials.
2. Click on a tab/menu item on page. This will open a new page or load a new iFrame.
3. Fill up from data in this page/iFrame and submit.

I want to capture data after Step 3.

I tried putting logdata 1 before I click submit button but I could not get any result in the wpt result.

I tried using combineSteps but it only worked for multiple steps. No data is captured for single step.

(07-08-2013 10:44 PM)pmeenan Wrote:  If you want to collect the full sequence then change the logdata 0/1 to be combinesteps. Otherwise WebPagetest will give you quite screwy results if you are trying to measure more than one interaction.

Your last command also needs to be an "andwait" variation, otherwise it's not going to wait for anything to happen before ending the test.

If you can't get it to interact with the page in the way you'd like, the easiest fallback is to use the exec command with a chunk of javascript and you can use a local browser console to get the javascript working the way you'd like before submitting it as part of the test.

RE: [split] How to test with a script? - pmeenan - 06-11-2015 12:09 AM

logData will do exactly what you are looking for.

logData 0
navigate <login page>
execAndWait <some js to click the menu>
setValue ...
logData 1
submitForm name=<form name>

(or something that looks generally like that - hard to say without specifics about the site).