Apple Script doesn't work with Safari menu of "Import From > Google Chrome.app"

Hi I'm trying to use this apple script below:

tell
 application "Safari"
	activate
	tell application "System Events"
		tell process "Safari"
			set frontmost to true
			click menu item "Google Chrome.app…" of menu of menu item "Import From" of menu "File" of menu bar 1
		end tell
	end tell
end tell



But it says "System Events got an error: Can’t get menu item "Google Chrome.app…" of menu of menu item "Import From" of menu "File" of menu bar 1 of process "Safari"." Error


I have no idea what's wrong with this script. Please give me any advice. Thanks.

Posted on Apr 2, 2022 10:38 PM

Reply

Similar questions

1 reply

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Apple Script doesn't work with Safari menu of "Import From > Google Chrome.app"

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