[ide] how to record redirects?

466 views
Skip to first unread message

Freakman

unread,
Mar 30, 2010, 4:43:14 AM3/30/10
to Selenium Users
Hi,
i want to test web application. I use IDE for recording and RC to
editing my script. Problem is: how to record redirects through ide?

I type in browser http://localhost:8000 which redirects me to other
page (and assign session id like /login.form;jsessionid=owag6n8g4zat?
id url) but the only thing i get in selenium ide is this second url -
i need to get this dynamically set sessionid in every test so in my
opinion i need sth like this:


1. open localhost:8000
2. get url with sessionid - somehow get it from url with regexp
3. use this sessionid to login into my webapp.

Is this possible?

Andrew

unread,
Mar 31, 2010, 10:42:34 AM3/31/10
to Selenium Users
Not sure if this is what you're looking for, but you can use the
command getLocation(); or storeLocation in IDE to capture the current
URL. You can then substr out or modify the variable the URL is stored
in.


On Mar 30, 2:43 am, Freakman <freakman1...@gmail.com> wrote:
> Hi,
> i want to test web application. I use IDE for recording and RC to
> editing my script. Problem is: how to record redirects through ide?
>

> I type in browserhttp://localhost:8000which redirects me to other

Jminne

unread,
Mar 31, 2010, 7:58:54 PM3/31/10
to Selenium Users
Since selenium is driving a real browser you dont' need to know what
the dynamically generated destination URL is. The test steps will
look like:

1) go to first url (redirects will happen, but so what)
2) enter login info
3) click login

and it should just work.

On Mar 30, 3:43 am, Freakman <freakman1...@gmail.com> wrote:
> Hi,
> i want to test web application. I use IDE for recording and RC to
> editing my script. Problem is: how to record redirects through ide?
>

> I type in browserhttp://localhost:8000which redirects me to other

Reply all
Reply to author
Forward
0 new messages