处理锁定计算机上的对话框窗口



我们使用Selenium WebDriver在多个浏览器中自动化Web应用程序,并使用AutoIt来处理窗口对象。我们正在虚拟机中工作。

我使用 AutoIt 单击

文件下载对话框窗口中的保存按钮,但在系统锁定时 AutoIt 不执行单击。 ControlClick()ControlSend()而不是ControlClick()Send()在系统锁定时适用于Google Chrome,但不适用于Internet Explorer。

我尝试了WinActivate()WinExists()ControlClick()ControlFocus()ControlSend()。这是代码:

_AutoIt.ControlClick("File Download", "Do you want to open or save this file?", "[ID:4427; TEXT:&Save; CLASS:Button; INSTANCE:2]");

为了让 Autoit 查找子窗口,您需要启用它

Opt("WinSearchChildren", 1) ;0=no, 1=search children also

最新更新