Hello. Thanks for this excellent resource.
After a couple of weeks of Watir use I've hit a niggly problem. I want
to run multiple concurrent instances of the browser, each logged into
the site-under-test as a different user. This sort of thing...
@ie1 = IE.new
@ie1.goto(test_site)
log in as Edgar
click some buttons...
@ie2 = IE.new
@ie2.goto(test_site)
log in as Cordelia
click some buttons...
The snag is that the site-under-test authenticates on a per-session
basis so when @ie2 goes to the site it doesn't see the log-in page. It
can't log in as Cordelia because it is already logged in as Edgar.
Logging off @ie2 causes @ie1 to be logged off too.
A possible workaround is to start a new session for each user by
launching iexplore.exe. If I manually open browser instances by
clicking on iexplore.exe I can have umpteen users logged on
concurrently, so this should work. I can do this within my script
using:
`start "#{'iexplore.exe'}" "#{'http://www...etc'}"`
and then use IE.attach. This works fine for the first instance
(though it threw an error until I put a 'sleep' between start and
attach), but when I try to open a second browser instance using
`start...` it closes the first instance. How can I get my Watir script
to act in the same way that manually clicking on iexplore.exe does?
Can anyone point me towards a possible solution?
Thanks,
George
_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general