title: How to check for the presence of static text displayed from the network in UI tests in Xcode?
body: <p>I am using the UI test APIs introduced in Xcode 7 XCTest. On my screen I have a text that is loaded from the network.</p>
  
  <p>The test fails if I simply check it with <code>exists</code> property.</p>
  
  <pre><code>XCTAssert(app.staticTexts["Text from the network"].exists) // fails
  </code></pre>
  
  <p>It does work though if I first send the tap or any other event to the text like this:</p>
  
  <pre><code>app.staticTexts["Text from the network"].tap()
  XCTAssert(app.staticTexts["Text from the network"].exists) // works
  </code></pre>
  
  <p>It looks like if I just call <code>exists</code> it evaluates it immediately and fails because the text has not been downloaded from the network yet. But I think when I call the <code>tap()</code> method it waits for the text to appear.</p>
  
  <p>Is there a better way to check for the presence of a text that is delivered from the network?</p>
  
  <p>Something like (this code will not work):</p>
  
  <pre><code>XCTAssert(app.staticTexts["Text from the network"].eventuallyExists)
  </code></pre>