Posts

Post marked as solved
5 Replies
6.8k Views
Hi everyone!Is it possible that the use of the tap() method doesn't work on UITableViews when the cell is not visible? Official documentation says that the method should make the cell with the correspective identifier visible and then tap on it.But if I try this code:let app = XCUIApplication() let myTableView = app.tables.element(matching: .table, identifier: "tableView01") let myCell = myTableView.cells.element(matching: .cell, identifier: "tappableCell") myCell.tap()I get this error: << UITests.testP() failed: Computed invalid hit point (-1.2, -0.5) for Cell, 0x17419c7d0, traits: 8589934593, identifier: 'tappableCell' >>And if I change the code into this: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()Nothing happens! On the command line I get the log as the action should've been computed but on the screen nothing happens!Then I tried positioning a breakpoint just before the tap() method and giving the tap command manually from the command line writing 'po myCell.tap()' and it worked indeed! What's happening?! I have the same strange bug with both Xcode 8.3.3 and Xcode 9 - Beta 4.Do you know any possible solution? Am I wrong in something? It could be related with my usage of accessibility identifiers to run the query?Thank you for your support!Andrea
Posted Last updated
.
Post not yet marked as solved
0 Replies
368 Views
Hi developers,I am developing a set of automated tests at work and I would like to attach an istance of Instruments for monitoring memory leaks during tests execution.I am searching a proper documentation for running instruments from CLI and I can't find some instructions like pause/stop recording and attaching my XCUITest to the session.Can someone help me with this? There is any Apple fellow who could give me some hints?Thank you for the help!Andrea
Posted Last updated
.