Ability to import script files broken in UIAutomation / Instruments 6 (DP5)
| Originator: | jlipps | ||
| Number: | rdar://17977900 | Date Originated: | 08/11/2014 |
| Status: | Closed | Resolved: | Duplicate of 17909227 |
| Product: | Instruments | Product Version: | 6.0 (56138.1) |
| Classification: | Serious Bug | Reproducible: | Always |
Summary:
In previous versions of UIAutomation, we were able to import javascript files into the UIAutomation context using the `#import` keyword/pattern. This no longer appears to work.
Steps to Reproduce:
Create two files:
1. /tmp/script.js, with the contents:
#import /tmp/foo.js
UIALogger.logError("2");
2. /tmp/foo.js, with the contents:
UIALogger.logError("1");
Now run the script with Instruments on any test app in the iOS8 simulator:
/Applications/Xcode6-Beta5.app/Contents/Developer/usr/bin/instruments -t /Applications/Xcode6-Beta5.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.xrplugin/Contents/Resources/Automation.tracetemplate -D /tmp/instrumentscli0.trace -w "iPhone 5s (8.0 Simulator)" /path/to/my/TestApp.app -e UIASCRIPT /tmp/script.js -e UIARESULTSPATH /tmp
Expected Results:
I expect to see the strings "1" and "2" logged successively, as in:
2014-08-11 16:48:00 +0000 Error: 1
2014-08-11 16:48:00 +0000 Error: 2
Actual Results:
Instead, we just get the second line:
2014-08-11 16:48:00 +0000 Error: 2
In addition, any variables defined in the imported script are also not available to the importing script. This says to me that #import is broken or replaced with some other undocumented keyword.
Version:
Xcode 6.0 (6A279r)
Instruments 6.0 (56138.1)
Notes:
Configuration:
All configurations
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!