Domanda

I am trying to give focus to a safari browser modal box and control its input and dismissal.

Example: Navigate to a website, it throws a modal box, is it possible to create an automator workflow or script that will be able to give the modal focus and interact with its content?

TIA,

BK

È stato utile?

Soluzione

Try using System Events:

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
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top