[Webtest] Way to retrieve current url? (resurrect the question)
Marc Guillemot
webtest@lists.canoo.com
Wed, 19 Oct 2005 13:04:47 +0200
Maxim Ann. wrote:
> MG> Which WebTest build do you use?
>
> Build-Date: August 15 2005
> Build-Number: R_988
should be enough
> MG> Normally, when a popup is closed, the "main" window should become the
> MG> "current response" again.
>
> It's true if you close the pop-up page after opening it.
>
> But if open the pop-up and do some complex testing on it (with a lot of
> clicks) - the "current response" is changed many times before you close the
> pop-up window. Simultaneously the <previousResponse> is changed many times.
>
> I guess only the most recent <previousResponse> is stored. So calling
> <previousResponse> several times sequentially will not return the context
> you to the "main" window. You will switch context between the two most
> recent pages (infinitely). Testing confirms this.
even in this case it should work. I personally use popups too which are
closed after some actions in the popup page (among others form
submission) and it works correctly. The only point that stays a bit
unnatural, is that the frameset becomes the current response and not the
last selected frame of the window when the popup is closed and the
"main" window is a frameset.
What does the log (category com.canoo.webtest.engine.Context) says about
how the "current response" is determined in your case?
Marc.