硒的webdriver为C# - 弹出对话框 [英] Selenium WebDriver for C# - Popup Dialog Boxes

查看:289
本文介绍了硒的webdriver为C# - 弹出对话框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有用弹出对话框的工作(特别是文件下载),在C#中任何支持?

Is there any support for working with popup dialogs (specifically file downloads) in c#?

推荐答案

没有,有ISN T - 至少本身不

No, there isn't - at least not natively.

的webdriver仅与网页进行交互。一个弹出对话框,一旦实例化,会成为操作系统,而不是网页的域名。

WebDriver only interacts with the webpage. A popup dialog, once instantiated, becomes the domain of the operating system instead of the webpage.

您可以通过发出POST或GET绕过文件下载/上传对话框与正在检索或发送到服务器的内容。

You can circumvent the file download/upload dialog by issuing a POST or a GET with the content you are retrieving or sending to the server.

您可以使用工具,如AutoIt的,或Windows自动化API,与其他对话窗口交互。

You can use tools such as AutoIt, or the Windows Automation API, to interact with other dialog windows.

这篇关于硒的webdriver为C# - 弹出对话框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆