Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试将焦点放在 safari 浏览器模式框并控制其输入和关闭。
示例:导航到一个网站,它会抛出一个模态框,是否可以创建一个自动化工作流或脚本来赋予模态焦点并与其内容交互?
TIA,
BK
尝试使用系统事件:
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