質問

In Xcode Instruments, how to #import a UIAutomation script that is listed under the "Scripts" section?

In the currentFile.js, I tried doing #import "functionsToImport.js". It didn't work, so I moved the file to my desktop and changed the import to #import "~/desktop/fcns.js" but neither of the solutions works

役に立ちましたか?

解決

Choose Automation -> Add -> Import and import your script file from the file system.

Doing like so will link the Instruments document to your script file, so when you use the #import keyword, it will look in the directory relative to where your script file resides.

Note that you have to import both js files to Instruments to work properly.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top