I'm trying to write an automation Javascript to test my app's AppleScript functionality. I want it to launch my dev build, so I started off like so:
my_app = Application('/Users/Dov/Library/Developer/Xcode/DerivedData/MyApp-efmlzhsvapzuwcfqxjxhhuncpogy/Build/Products/Debug/MyApp.app')
When I run the script, it launches another build in a totally different directory. However, the following AppleScript does launch the intended dev build:
tell application "/Users/Dov/Library/Developer/Xcode/DerivedData/MyApp-efmlzhsvapzuwcfqxjxhhuncpogy/Build/Products/Debug/MyApp.app"
activate
end tell
Shouldn't these both behave the same way? And how/why would it look for another app with the same Bundle ID? This documentation says my Javascript syntax should work:
Accessing Applications
Applications can be accessed in these ways:
Name
Application('Mail')
Bundle ID
Application('com.apple.mail')
Path
Application('/Applications/Mail.app')
...