title: How do I detect what iOS device my function tests are running on?
body: <p>I currently have a number of function tests written in javascript using Apple's UIAutomation API. The tests are written for iPhone, but the application also supports the iPad. </p>
  
  <p>To extend my tests to run on an iPad I need to make some adjustments in the code, but first I need to find out what device is running the tests.</p>
  
  <p><strong>How do I detect what device/simulator is running the tests?</strong> when I'm running the javascript tests from the Automation tool.</p>