等待打开文件对话框在 Selenium 中打开

问题描述

我有一个驱动程序,它点击页面上的浏览按钮,打开一个打开文件对话框。截至目前,我正在执行 Thread.Sleep(2000) 但有没有办法确定对话框何时打开?

[Fact]
public void UploadDoc()
{
   UploadButton.Click();

   // How can I wait for the dialog to open instead of doing this?
   Thread.Sleep(2000);

   // Sends keys to open dialog and continues execution
}

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)