title: How to get Instruments attached to simulator for UI Automation Testing
body: <p>I'm trying to figure out how to do automated UI testing so that I can test my app for regression errors as I make changes and such. I'm following the instructions found in <a href="https://developer.apple.com/library/mac/documentation/DeveloperTools/Conceptual/InstrumentsUserGuide/UsingtheAutomationInstrument/UsingtheAutomationInstrument.html" rel="nofollow noreferrer">Apple's documentation</a>. I built my app in Xcode and it is running in the iOS simulator. </p>
  
  <p>I opened Instruments and chose the iOS Automation instrument. However, I can't seem to figure out how to get Instruments to run the script on my iOS app in the sim. When I first create the Automation instrument the target drop down just says "lkj" but if I try to choose the sim as my target, it tells me that the Automation instrument doesn't allow attaching.</p>
  
  <p><img src="https://i.stack.imgur.com/tBMJV.png" alt="enter image description here"></p>
  
  <p>How do I get Instruments to run my test on my iOS app? </p>
  
  <p>I tried just running it with the "lkj" target selected and I got a weird error involving some random guy's name (I'm assuming he's a dev for Instruments or something?)</p>
  
  <blockquote>
    <p>Path not found
    '/Users/jonathan_morgan/Library/Developer/Xcode/DerivedData/lkj-randomstringofcharacters/Build/Products/Release-iphonesimulator/lkj.app/lkj</p>
  </blockquote>