[Webtest] options for verify steps that change current window

Lucas, Casey webtest@lists.canoo.com
Tue, 18 Apr 2006 18:00:25 -0500

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
page before using verifyLinks so that other clickButton etc. steps will
to proceed with the original page?  Maybe there is some other
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"/>