문제

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

도움이 되었습니까?

해결책

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
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top