I am trying to create a script which lists me all available open simulators to inspect in safari developer tools but when I run the code I get the below error. At the end this script should open the inspector tool for one simulator device. My guess it that in general this is not allowed but I gave the terminal the accessibility rights so yeah I have no idea.
listDevices.applescript:122:168: script error: „"Simulator" of menu "Entwickler" of menu bar 1“ kann nicht gelesen werden. Zugriff nicht erlaubt. (-1723)
tell application "System Events" tell process "Safari" name of every menu item of menu item where its name starts with "Simulator" of menu "Entwickler" of menu bar 1 end tell end tell