MyBB Internal: One or more warnings occured. Please contact your administrator for assistance.
WebPagetest Forums - screen shot get the previous page which i set logData 0

WebPagetest Forums

Full Version: screen shot get the previous page which i set logData 0
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I wrote a script on A page to direct to B page.

Script as follows:

setHeader Accept-Language: zh-cn,zh;q=0.8,en-us;q=0.5,en;q=0.3
logData 0
navigate http://flights.ctrip.com
sleep 2
setValue id="DCity1" SHA
setValue id="ACity1" BJS
setValue id="DepartDate1TextBox" 2012-09-01

logData 1
navigate exec window.location.href = "http://flights.ctrip.com/booking/"+document.getElementById('DCity1').value+"-"+document.getElementById('ACity1').value+"----adu-1/?Dayoffset=5&DDate1="+document.getElementById("DepartDate1TextBox").value+"";

And I watch the instance to open the browser.It will first open http://flights.ctrip.com and then go to next page.

But the screen shot get the first page(http://flights.ctrip.com) even I set logData 0.

I want the next page screen shot.

Is there anything I'm missing?

Help meHuh~~ Thanks a lot~Tongue
Your last command after the logData 1 is not a valid command. You need to use either a navigate command (with a fixed url) or an execAndWait command (with the corresponding javascript).
Thanks for your reply.

Sorry, I put a wrong script.

My script update as

setHeader Accept-Language: zh-cn,zh;q=0.8,en-us;q=0.5,en;q=0.3
logData 0
navigate http://hotels.ctrip.com
sleep 2
setValue id=txtCheckIn 2012-09-28
setValue id=txtCheckOut 2012-09-30
setValue id=cityId 32
setValue id=cityPY guangzhou
setValue id=hidDistrictCity 32
setValue id=txtCity %B9%E3%D6%DD
exec document.getElementById("__VIEWSTATE").name ='xxx'
exec window.document.forms[0].action = "http://hotels.ctrip.com/hotel/"+document.getElementById('cityPY').value+document.getElementById('cityId').value​

logData 1
submitForm name'aspnetForm

But it still capture the picture of http://hotels.ctrip.com, instead of next page.

I work well on webpagetest.org website, see http://www.webpagetest.org/result/120905_XA_BRV/
But in my computer, it can't work.

Is there anything I need to set?
Reference URL's