Search code examples
internet-explorertabswatin

how to get the content of the new tab in the internet explorer in watin?


I am using watin for some UI testing. In one of the testing, I need to click a link and open a popup windows in new tab(which I set up in IE9), and get the content of the new tab. However I don't know how do I ask watin to switch to new tab and get the content.

I've tried to use SendKeys.SendWait("^{TAB}");, but doesn't seem to work, the Browser.Html still get the content of the first email.

anyone can shed some lights? Thanks.


Solution

  • You need to use the Browser.AttachTo method See this blog post: Link