[Webtest] Way to retrieve current url? (resurrect the question)
Maxim Anniuk
webtest@lists.canoo.com
Tue, 18 Oct 2005 15:14:58 +0400
Hi dear WebTest experts,
This question was already asked in this mailing list.
I'd like to ask it again in the following context:
I need to store the current URL because during my tests I open a pop-up
window, then perform several clicks there than close it by JavaScript.
After this I have to return back to the opener window.
The problem is that WebTest currently doesn't automatically return to the
opener window: "... when a closed event is detected webtest now does the
equivalent of <previousResponse>". See issue:
http://webtest-community.canoo.com/jira/browse/WT-54
Which means it stays on the pop-up window in my case.
The only solution here is to store the URL of the opener and invoke it
instead of closing the pop-up window.
But it seems there is no way to store it!?
The URL in my case is dynamic (I am redirected to it). Not only parameters
are changed but part of the path as well, eg.:
http://myhost/12133246459?sessionId=xxx
where "12133246459" and "xxx" are changing parts. I can store sessionId
parameter by <storeProperty>, but how I can store part of the path:
"12133246459"?
The only way I know - by using XPath functions?
Too complicated, do you agree?
The life would much easier if webtest allowed to store current URL.
Any help would be much appreciated.
--
Maxim Ann.