Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

AppleScript: How to click a Text “Button”?

Hello,

I'm trying to click the button "log out" using applescript.


User uploaded file


To click the "Choose Photo..." button:



tell application "System Events"
    tell process "Uploader HD for Instagram"
    click button "Choose Photo..." of window "Uploader HD for Instagram"
    delay 1
    end tell
    end tell



The code above works as expected.



The problem is when I try to click the (log out) text with the same code, it does not work.
According to "Accessibility Inspector" the element is not a button.

UI AXRoleDescription: "text"



Can anyone please help me, how or what code I need to use?

I need to mention that already try using tab to focus the text and then return... but that doesn't work.


Any help will be much appreciated. Thank you.

Mac Pro (Mid 2012)

Posted on Feb 16, 2016 12:16 AM

Reply
1 reply

AppleScript: How to click a Text “Button”?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.