开发者

Handling web page dialogues with WATIN

开发者 https://www.devze.com 2022-12-20 04:43 出处:网络
I have a web page that pops up a web page dialog. How can i handle开发者_JS百科 this using WatiN ?If your popup is really a new browser window, to access it you\'ll need to create a new WatiN IE objec

I have a web page that pops up a web page dialog. How can i handle开发者_JS百科 this using WatiN ?


If your popup is really a new browser window, to access it you'll need to create a new WatiN IE object tp attach to your popup.

You can attach to the popup using the name of the popup or the URL. If you use WatiN 1.3 it will look like this :

By page name:

IE ie = IE.AttachToIE(Find.ByTitle("MyPageName"));

By url:

IE ie = IE.AttachToIE(Find.ByUrl("http://www.test.com/popup.htm"));

It's should work with WatiN 2.0 RC1, but they add other mechanism to do it, check here : http://watinandmore.blogspot.com/2010/01/browserattachto-and-iattachto.html

0

精彩评论

暂无评论...
验证码 换一张
取 消