Re: [Watin-users] How does WatiN detect/track new tabs in IE7
Brought to you by:
jvmenen
From: Bruce M. <tek...@gm...> - 2007-12-15 12:28:07
|
Jeroen, I have hung up my UIAutomation boots for the time being and am back on WatiN again in full swing. If you need any testing just let me know. Regards Bruce McLeod -----Original Message----- From: wat...@li... [mailto:wat...@li...] On Behalf Of Jeroen van Menen Sent: Tuesday, 11 December 2007 7:14 PM To: wat...@li... Subject: Re: [Watin-users] How does WatiN detect/track new tabs in IE7 This looks OK to me. I'll let you know when I changed the implementation and maybe you could do some test? Jeroen Robert Voigt schreef: > Just to be sure I interpreted WatiN calls correctly, here is a VB test > case snippet. Both AttachTo attempts display failed messages. And > although my screen shows an IE session with two tabs, the > InternetExplorers collection length is zero. > > Dim ie1 As IE > Dim ie2 As IE > Dim ie3 As IE > ie1 = New IE("watin.sourceforge.net") > ie1.Link(Find.ByText("WAX")).Click() > Try > ie2 = IE.AttachToIE(Find.ByUrl("http://www.codeplex.com/wax")) > Catch > MsgBox("First attach failed") > End Try > Try > ie3 = IE.AttachToIE(Find.ByUrl("http://watin.sourceforge.net")) > Catch > MsgBox("Second attach failed") > End Try > MsgBox(Str(IE.InternetExplorers.Length)) > > > */Robert Voigt <vo...@ya...>/* wrote: > > I'm running the test as Admin, but when link opens a new screen it > doesn't find the other copy of IE with any variation of > the AttachTo. I suspect I'm falling into a variation of the > missing InternetExplorers collection members in Vista. So I'm > looking forward to the upcoming release and I'll post back if it > addresses the issue. Thanks for the response Jeroen. > > Rob V > > */Jeroen van Menen <je...@va...>/* wrote: > > Hi Robert, > > Always nice to talk in unit tests so I wrote one to see how > WatiN would handle Tabs with IE7 on XP. The following test > runs fine when IE is set to create a new tab (when the WAX > link is clicked). It also works fine when IE setting is > changed (manually) to show up a new screen. Problem (still) is > I can't test this on Vista cause I don't have a license. I > recently received a workaround which bypasses the collection > of internet explorers used from shdocvw.dll (which has > different behavior on Vista probably because of the new UAC). > Still have to add that to the code and it might solve all > problems related to Vista, IE.AttachTo and IE.InternetExplorers. > > Did you try to run the tests as an administrator (turn off UAC > or run your unittester with administrator rights)? > > [Test] > public void TestAttachToWhenUsingTabs() > { > IE ie1 = null; > IE ie2 = null; > try > { > ie1 = new IE("watin.sourceforge.net"); > ie1.Link(Find.ByText("WAX")).Click(); > > ie2 = > IE.AttachToIE(Find.ByUrl("http://www.codeplex.com/wax")); > > > Assert.IsNotNull(IE.AttachToIE(Find.ByUrl("http://watin.sourceforge.net")), > "WatiN"); > Assert.IsNotNull(ie2, "WAX"); > } > finally > { > if (ie1 != null) ie1.Close(); > if (ie2 != null) ie2.Close(); > } > } > > HTH, > Jeroen > > > > Robert Voigt schreef: >> In IE7 (in Vista), when user clicks a link that opens a new >> tab, how can new tab be detected with WatiN? I've tried >> InternetExplorers collection, but that's either not >> working (based on several posts to maillist) or I'm simply >> using the wrong approach. Attaching to it as a pop up didn't >> seem to do the trick either. >> >> I've also tried disabling IE feature to start in new tab and >> that results in a new browser, but it still doesn't show up >> in InternextExplorers collection so I can't access it. >> >> And of course, the real goal is to automate manipulation of >> the new tab... >> ------------------------------------------------------------------------ >> Looking for last minute shopping deals? Find them fast with >> Yahoo! Search. >> <http://us.rd.yahoo.com/evt=51734/*http://tools.search.yahoo.com/newsearch/c ategory.php?category=shopping> >> >> ------------------------------------------------------------------------ >> ------------------------------------------------------------------------- SF.Net email is sponsored by: Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php >> ------------------------------------------------------------------------ >> _______________________________________________ Watin-users mailing list Wat...@li... https://lists.sourceforge.net/lists/listinfo/watin-users >> ------------------------------------------------------------------------ >> No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.503 / Virus Database: 269.16.17/1178 - Release Date: 8-12-2007 11:59 > ------------------------------------------------------------------------- > SF.Net email is sponsored by: > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services for > just about anything Open Source. > http://sourceforge.net/services/buy/index.php_______________________________ ________________ > Watin-users mailing list > Wat...@li... > https://lists.sourceforge.net/lists/listinfo/watin-users > > > ------------------------------------------------------------------------ > Looking for last minute shopping deals? Find them fast with Yahoo! > Search. > <http://us.rd.yahoo.com/evt=51734/*http://tools.search.yahoo.com/newsearch/c ategory.php?category=shopping>---------------------------------------------- --------------------------- > SF.Net email is sponsored by: > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services for > just about anything Open Source. > http://sourceforge.net/services/buy/index.php_______________________________ ________________ > Watin-users mailing list > Wat...@li... > https://lists.sourceforge.net/lists/listinfo/watin-users > > > ------------------------------------------------------------------------ > Never miss a thing. Make Yahoo your homepage. > <http://us.rd.yahoo.com/evt=51438/*http://www.yahoo.com/r/hs> > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > SF.Net email is sponsored by: > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services for > just about anything Open Source. > http://sourceforge.net/services/buy/index.php > ------------------------------------------------------------------------ > > _______________________________________________ > Watin-users mailing list > Wat...@li... > https://lists.sourceforge.net/lists/listinfo/watin-users > > ------------------------------------------------------------------------ > > No virus found in this incoming message. > Checked by AVG Free Edition. > Version: 7.5.503 / Virus Database: 269.16.17/1178 - Release Date: 8-12-2007 11:59 > ------------------------------------------------------------------------- SF.Net email is sponsored by: Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php _______________________________________________ Watin-users mailing list Wat...@li... https://lists.sourceforge.net/lists/listinfo/watin-users |