4 messages in com.canoo.lists.webtest[Webtest] options for verify steps th...
FromSent OnAttachments
Lucas, Casey18 Apr 2006 16:00 
Marc Guillemot18 Apr 2006 23:42 
Lucas, Casey19 Apr 2006 06:48 
Marc Guillemot19 Apr 2006 07:12 
Subject:[Webtest] options for verify steps that change current window
From:Lucas, Casey (clu@e-miles.com)
Date:04/18/2006 04:00:02 PM
List:com.canoo.lists.webtest

I'm evaluating webtest and have run into an issue/question. I'm walking through a few pages (login + navigation) and would like to verify multiple things (title, text, links, images, etc.) All is good until verifyLinks (or verifyImages) changes the concept of "current window". After that, subsequent clickButton (or similar) requests will not work because webtest is on a different page/image.

I looked at the code and this all appears to be a result from the call to Context.saveResponseAsCurrent. Is there some step where I can save the current page before using verifyLinks so that other clickButton etc. steps will continue to proceed with the original page? Maybe there is some other strategy/pattern to follow?

I tried <previousResponse/> but it only goes back one page/image/link vs. back to the original page (from invoke/clickButton/etc.)

sample script (run via Webtest R_1217)

<invoke description="get home page" url="/" /> <verifyTitle text="..." /> <verifyText text="..." /> <selectForm name="Login" description="select login form"/> <setInputField name="..." value="..." description="fill in email"/> <setInputField name="..." value="..." description="fill in password"/> <verifyLinks onsiteonly="true" description="check links"/> <clickButton name="SUBMIT"/>

Thanks Casey