0

我正在尝试将焦点放在 safari 浏览器模式框并控制其输入和关闭。

示例:导航到一个网站,它会抛出一个模态框,是否可以创建一个自动化工作流或脚本来赋予模态焦点并与其内容交互?

TIA,

BK

4

1 回答 1

0

尝试使用系统事件:

tell application "System Events" to tell process "Safari"
    click button "OK" of window 1
end tell
tell application "System Events" to tell process "Safari"
    set value of text field 1 of window 1 to "aa"
    click button "OK" of window 1
end tell
于 2013-07-06T16:28:27.327 回答