I have a computer set up with Win XP Pro SP2 and Internet Explorer 7 Beta 1, and I ran one of my scripts to see what would happen. For the most part, everything ran as expected except for one thing - instead of opening a link in a new browser window, it opened it in a new tab. (Tabbed browsing is one of the new features of IE7.)
I couldn't figure out how to switch to that tab in IE7 via Ruby/Watir. To illustrate, here's what I tried: in IE7 I had the first tab displaying our web application's Home page, and in a second tab I had the Google page up. I clicked on the first tab and noticed that the window title bar switched to show my app's Title.
I opened up IRB in a new command prompt and tried: ie = IE.attach(:title, 'Google')
--> It just sort of hangs until I manually click on the right tab in the browser. *Then* control returns to IRB.
I don't know if this is on anybody's radar yet. It's not a part of my application or an immediate need. I'm just curious to know if anyone working on Watir has played with this yet.
Do you think perhaps we can add a new command like: IE.tab(:title, /blah/) or would it be better to enhance IE.attach to sift through the tabs in addition to any other open browser windows? (Because we might not know if it's in a new tab or window depending on the user's browser settings.)
Cheers. Paul.
(In the meanwhile, I just enabled the IE7 option: Tools > Intenet Options > Advanced > "Tabbed Browsing > Always open pop-ups in a new window" and all's good.)
_______________________________________________ Wtr-general mailing list [email protected] http://rubyforge.org/mailman/listinfo/wtr-general
