Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re^5: Selenium RC - How to reuse bowser session?

by zerocred (Beadle)
on Mar 22, 2010 at 18:41 UTC ( [id://830140]=note: print w/replies, xml ) Need Help??


in reply to Re^4: Selenium RC - How to reuse bowser session?
in thread Selenium RC - How to reuse bowser session?

BTW I'm using Selenium RC server running on WinXP controlled from perl on Linux.

Ok I have to use the option:

auto_stop="0"

In the $sel...->new(...) constructor and the subsequent connections. Don't call

$sel->start;

in the routine to reconnect to the existing session.

I get Unknown command 'getExistingBrowserSession' if I use the function above - a great pity it looks like a very elegant way to get the session_id. My SeRC is on a WinXP box as the website only works on IE.

The command

$sel->retrieve_last_remote_control_logs();

seems to return a bunch of stuff and the session_id is in there - so I can parse an existing session_id from that.

I also found out how to avoid the website thinking I was navigating away - by using a open_ok() to a link that it is happy to navigate to without logging out - I tried that before but realized the date needs to be part of the link! That way I can maintain the session.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://830140]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (3)
As of 2024-04-19 19:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found