【问题标题】:Handling dialog windows on a locked machine处理锁定机器上的对话窗口
【发布时间】:2014-01-10 14:24:14
【问题描述】:

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

我使用 AutoIt 在 Filedownload 对话窗口中单击保存按钮,但 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]");

【问题讨论】:

    标签: selenium internet-explorer selenium-webdriver autoit


    【解决方案1】:

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

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

    【讨论】:

    • 嗨 Milos,我需要识别并处理从 Web 应用程序弹出的窗口。我有一个在 IE 和 Chrome 上运行的脚本。该脚本在系统被锁定和未锁定时在 Chrome 上运行。但在 IE 中,当系统未锁定时,相同的脚本运行良好。只有当系统锁定在 IE 上时才会出现问题。
    猜你喜欢
    • 2020-04-05
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-01-20
    • 1970-01-01
    • 1970-01-01
    • 2022-12-15
    相关资源
    最近更新 更多