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.