title: How to open url in Safari and the get back to the app under UITests in Xcode 7?
body: <p>This is my custom view where <code>"LondonStreet"</code> is a button.</p>
  
  <p><a href="https://i.stack.imgur.com/uvL3tl.png" rel="noreferrer"><img src="https://i.stack.imgur.com/uvL3tl.png" alt="enter image description here"></a></p>
  
  <p>When I tap that button I get url and open it in Safari (it works). Then I can go back, using <code>"Back to Wishlist"</code> button (it also works).</p>
  
  <p><a href="https://i.stack.imgur.com/S9zcYl.png" rel="noreferrer"><img src="https://i.stack.imgur.com/S9zcYl.png" alt="enter image description here"></a></p>
  
  <p>The problem is when I try to test this under UITests.</p>
  
  <pre><code>itemsTable.cells.elementBoundByIndex(0).buttons["addressButton"].tap() //press the button to open link in Safari
  </code></pre>
  
  <p>Along with this line:  </p>
  
  <pre><code>app.statusBars.buttons["Back to Wishlist"].tap() //go back, doesn't work, although it was recorded by Xcode itself.
  </code></pre>
  
  <p>is an error:</p>
  
  <blockquote>
    <p>UI Testing Failure - Failed to get screenshot within 5s.</p>
  </blockquote>
  
  <p>And also in <strong>issue Navigator</strong></p>
  
  <blockquote>
    <p>UI Testing failure - Unable to update application state promptly.</p>
  </blockquote>
  
  <p><a href="https://i.stack.imgur.com/Iam7n.png" rel="noreferrer"><img src="https://i.stack.imgur.com/Iam7n.png" alt="enter image description here"></a></p>