title: how to use Instrumentation under the uiautomator project?
body: <p>I'm working on a uiautomator project recently and then the UiObject.getFromParent turn out a wrong element to me and I look into the source code of uiautomator and found out the answer is because by the UiSelector I used.</p>
  
  <p>I found that the uiautomator is using the Instrumentation to get the UI element stuff just like :</p>
  
  <pre><code>getInstrumentation().getUiAutomation().getRootInActiveWindow();
  </code></pre>
  
  <p>I just want to get a AccessibilityNodeInfo node just like what uiautomator do but the uiautomator didn't exposed this.</p>
  
  <p>I’m trying this way by a new class extends InstrumentationTestCase,by the getInstrumentation() always return a null to me.</p>
  
  <p>i found an answer on
   <a href="https://stackoverflow.com/questions/3678959/android-instrumentation-test-case-getinstrumentation-returning-null">android instrumentation test case - getinstrumentation() returning null</a> 
   that needs <code>injectInstrumentation(InstrumentationRegistry.getInstrumentation());</code>
   and told InstrumentationRegistry is from the official Android testing-support-lib:0.1</p>
  
  <p>I have download the Android Support Repository and import the testing-support-lib-0.1-source.jar into my project but I still can't see InstrumentationRegistry.</p>
  
  <p>Anyone have any idea about my cast?</p>