screen shot get the previous page which i set logData 0
|
09-05-2012, 07:50 PM
Post: #1
|
|||
|
|||
screen shot get the previous page which i set logData 0
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 me ![]() ![]() |
|||
09-05-2012, 11:58 PM
Post: #2
|
|||
|
|||
RE: screen shot get the previous page which i set logData 0
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).
|
|||
09-06-2012, 12:08 AM
Post: #3
|
|||
|
|||
RE: screen shot get the previous page which i set logData 0
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? |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)