title: Appium. Mobile App Automation. Wait until
body: <p>Friends, please help!</p>
  
  <p>I don't know how to do "wait.until".  </p>
  
  <p>I'm using Appium with UIAutomator.</p>
  
  <p>My test would wait until new app's page will loaded and 'Text 1' in text field will be checked. </p>
  
  <p>I have such parameters in UIAutomator:</p>
  
  <pre><code>text : Text 1;
  
  recource-id: payment_content_title;
  
  class: android.widget.TextView;
  
  package: ru.mts.stm.mobilemts;
  </code></pre>
  
  <p>IntelliJ says that my code is incorrect:</p>
  
  <pre><code>WebDriverWait wait;
      wait = new WebDriverWait(driver, 60);
      wait.until(ExpectedConditions.textToBe(new MobileBy.ByAndroidUIAutomator(text),"Text 1"));
  </code></pre>
  
  <p>Thanks</p>