I have this code to dismiss a popup for a website. The popup has no title, however it has text. How can I make this so it doesn't do it for all websites and/or doesn't do it for all dialog boxes. I tried if exists (text "Hit OK to continue" of window "") but it didn't like that. I would like to us it with Safari and Chrome.
repeat
if (exists application "Google Chrome") then
tell application "System Events" to tell process "Google Chrome"
if exists (button "OK" of window "") then
click (button "OK" of window "")
delay 2
click (button "OK" of window "")
end if
end tell
end if
delay 10
end repeat
Recent Questions...
ما را در سایت Recent Questions دنبال میکنید
برچسب:
نویسنده: استخدام کار
بازدید: 219
تاريخ: شنبه
15 خرداد
1395 ساعت: 0:50