I think the windows 'runas' command might let you do this but it requires a little work to set it up. See the article here (the part at the very bottom):
http://ask.metafilter.com/50999/me-want-two-cookies Caveat: I haven't tried these instructions. I think I got something working briefly back in 2007 but I ended up not using it as I didn't need to test something like a shopping cart. ________________________________ From: Barry <[email protected]> To: Watir General <[email protected]> Sent: Monday, January 9, 2012 8:16 AM Subject: [wtr-general] Re: watir::IE multiple windows always connect to same session Thanks for your reply. If I open multiple IE windows manually, they will share the same cookie. This is the case also for Firefox. However, if I use watir- webdriver, the multiple Firefox windows opened by watir-webdriver do not share the cookie. This is why I am confused. I didn't try IE in watir-webdriver because it gives me errors when clicking a button. Also, people talk about the difference of Watir::IE.new and Watir::IE.start or start_process. These functions are for Watir, not Watir-webdriver. From my understanding, start_process() should open different sessions. So I am wondering if other people could open IE windows in a way as watir-webdriver for Firefox. Barry On Jan 9, 2:58 am, Chuck van der Linden <[email protected]> wrote: > if you open multiple IE sessions manually do they share cookies? if > so this is a fundimental IE thing and there's not much we are likely > to be able to do about it. > > On Jan 8, 12:09 pm, Barry <[email protected]> wrote: > > > > > Nobody has this problem? All your IE windows have different sessions > > with watir? > > > Barry > > > On Jan 6, 10:34 pm, Barry <[email protected]> wrote: > > > > I tried to open two IE windows at the same time. In watir-webdriver, > > > Firefox alway open them in seperate session. But in Watir, the two IE > > > windows share the same cookie. For example, the shopping cart is > > > shared. How can I keep the shopping carts seperated? I tried > > > new_process, open_process, start, new. But all didn't work. > > > > require "watir" > > > browser = Watir::IE.new > > > browser.goto(link) > > > ..... > > > > Thanks! > > > > Barry- Hide quoted text - > > > - Show quoted text - -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. [email protected] http://groups.google.com/group/watir-general [email protected] -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. [email protected] http://groups.google.com/group/watir-general [email protected]
