开发者

Watin : Open Windows form in watin

i have a link that when we click will produce a window开发者_如何转开发s form that prompt us to download.Is there a way using watin for us to attach to this form and click the button?Can someone please direct me to the correct way?


What do you mean by saying, that clicking a linkd produces a windows form? Isn't it just a separate IE window, probably created by js window.open? If so, then you need to create separate WatiN IE instance by attaching to that window. For example, if you want to control internet explorer window with title "My popup", you can do it that way:

var popup = IE.AttachTo<IE>(Find.ByTitle("My popup"))

You can find IE windows using constraints created using: Find.ByUrl, Find.ByUri, Find.By("hwnd", windowHandle) and mentioned Find.ByTitle.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜