title: Appium fails to locate element off-screen using UiSelector
body: <p>I'm starting to automate a test suite for a mobile app coded in NativeScript (it used to be a hybrid Cordova app) and it's proving difficult to locate some elements. </p>
  
  <p>I'm trying to locate a TextView widget that's outside of the visible screen space (AKA viewport) using UiSelector:</p>
  
  <pre><code>@AndroidFindBy(uiAutomator = "new UiSelector().textContains(\"CFT\")")
  private MobileElement labelCFT;
  </code></pre>
  
  <p>When I try to interact with such element, the result is the following message:</p>
  
  <pre><code>org.openqa.selenium.NoSuchElementException: Can't locate an element 
  by this strategy: By.chained({By.AndroidUIAutomator: 
  new UiSelector().textContains("CFT")})
  </code></pre>
  
  <p>The logic conclusion would be that the element does not exist or my locator strategy is faulty. But here is the thing, when I change the text to find for that of an element that's <strong>inside the visible space/viewport</strong>, the locator works flawlessly. Example:</p>
  
  <pre><code>@AndroidFindBy(uiAutomator = "new UiSelector().textContains(\"loans\")")
  private MobileElement labelCFT;
  </code></pre>
  
  <p>And then:</p>
  
  <pre><code>public void whatText() {
      System.out.println("Text of the label: " + labelCFT.getText());
  }
  </code></pre>
  
  <p>I get the correct "Text of the label: These are your loans".</p>
  
  <p>Apparently, it's a limitation of the UiSelector or at least the way Appium works with it.</p>
  
  <p>The only option I imagine is to scroll the whole screen and then trigger @AndroidFindBy, then repeat until there's no scroll left.</p>
  
  <p>Is this suppose to be how UiSelector and textContains() work? 
  Is it another solution for this? </p>
  
  <p>Many thanks.</p>