Click Chrome extension button

Hey Jon,

Okay. Like the other scripts the first script will get you properties (instead of just names) of the buttons, except this time from toolbar 1.

I did it this way, because when I ran it here with just name NO names were returned (because the developers didn't provided for this level of accessibility).

Properties will let you see more info.

The second script is able to discover my 1Password button via its accessibility description, and this may or may not work for your button.

If you can't get this working then tell me what extension your using in Chrome, and I'll fix it.

-Chris


------------------------------------------------------------
# Get properties of buttons of toobar 1 in Chrome
------------------------------------------------------------
tell application "System Events"
  tell application process "Google Chrome"
    tell (first window whose subrole is "AXStandardWindow")
      tell toolbar 1
        properties of buttons
      end tell
    end tell
  end tell
end tell
------------------------------------------------------------
------------------------------------------------------------
# Press a button that doesn't have a name.
------------------------------------------------------------
tell application "System Events"
  tell application process "Google Chrome"
    set frontmost to true
    tell (first window whose subrole is "AXStandardWindow")
      tell toolbar 1
        tell (first button whose accessibility description is "1Password")
          perform action "AXPress"
        end tell
      end tell
    end tell
  end tell
end tell
------------------------------------------------------------
1 Like