如何在 C# 或 WatiN 中关闭子浏览器?
我想关闭“浏览器”类型的子窗口。看看下面的代码。
WatiN.Core.Browser openBrowser = BrowserType.getBrowserObject().attachChildBrowser(document_name + Constants.open_document_title);
我想关闭“openBrowser”。 Close()(WatiN 中可用)只能用于“Firefox”类型“IE”。所以,我也不能使用 Close() 方法。 C# 或 WatiN 有没有关闭浏览器的方法?
I want to close the child window which is of "Browser" type. Have a look at the below code.
WatiN.Core.Browser openBrowser = BrowserType.getBrowserObject().attachChildBrowser(document_name + Constants.open_document_title);
I want to close the "openBrowser". Close()(available in WatiN) can only be used for the type "IE" of "Firefox" only. So, I cant use Close() method also. Is there any method to close the browser in C# or WatiN?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您是否尝试过使用 IE 类型而不是浏览器类型?你可以尝试这样的事情:
Have you tried using the IE type instead of the browser type? You could try something like this: