title: UITesting in iOS: tap() method doesn't work properly
body: <h2>I am facing a strange problem with UITesting in Swift under iOS 10.3.2 and Xcode 8.3.3 .</h2>
  
  <p>I am running a simple test inside my app which should tap and verify every single row inside a TableView (is the Settings view of my application so every single row is loaded from the disk and nothing is downloaded from the web at this step), but for a strange reason when I tap on a row which previously wasn't visible the .tap() method doesn't work.</p>
  
  <p>Example Code:</p>
  
  <pre><code>let app = XCUIApplication()  
  
  let myTableView = app.tables.element(matching: .table, identifier:    "tableView01")  
  myTableView.swipeUp(). //I swipe so that the cell becomes visible...  
  
  let myCell = myTableView.cells.element(matching: .cell, identifier: "tappableCell")  
  
  myCell.tap()  
  </code></pre>
  
  <hr>
  
  <p>The strange thing is that <strong>I have a correct output from the console in Xcode</strong>.</p>
  
  <pre><code> t =   328.24s     Tap "tappableCell" Cell
      t =   328.24s         Wait for app to idle
      t =   328.80s         Find the "tappableCell" Cell
      t =   328.80s             Snapshot accessibility hierarchy for com.thefloow.enterprise.ownbrand
      t =   328.92s             Find: Descendants matching type Table
      t =   328.92s             Find: Element at index 0
      t =   328.92s             Find: Descendants matching type Cell
      t =   328.92s             Find: Elements matching predicate '"tappableCell" IN identifiers'
      t =   329.04s             Wait for app to idle
      t =   329.22s         Synthesize event
      t =   329.37s         Wait for app to idle
  </code></pre>
  
  <p>Another strange thing is that if <strong>I put a breakpoint before the tap method and then I run it from the command line it works perfectly giving me the same output from the console.</strong> </p>
  
  <p>What could be the reason of this strange behaviour? </p>
  
  <hr>
  
  <p>Thank you for your help!
  Andrea</p>