Table cell child elements have "visible" attribute set to false
See original GitHub issueHi,
I have created a simple IOS application with a table which is being populated upon clicking a button. The newly created table cells and their content is visible on the device. They are also available in the Appium inspector model but their “visible” attribute is set to “false”
I created the following script for Apple instruments for the very same application:
var target = UIATarget.localTarget();
var mainWindow = target.frontMostApp().mainWindow();
mainWindow.buttons()["Add New Cell"].tap();
var tableView = mainWindow.tableViews()["Empty list"];
var tableCells = tableView.cells();
for(var cellIdx = 0; cellIdx < tableCells.length; cellIdx++) {
var cellElements = tableCells[cellIdx].elements();
for(var elementIdx = 0; elementIdx < cellElements.length; elementIdx++) {
var currentElement = cellElements[elementIdx];
UIALogger.logMessage("Element with name " + currentElement.name() + "; visible=" + currentElement.isVisible());
}
}
UIALogger.logMessage("Done")
The script would press the button for adding a new table cell and would traverse the cell elements printing their “visible” value. In the log I get the following results:
Element with name Text1; visible=1
Element with name Text 2; visible=1
Element with name null; visible=1
As you can see according to instruments all the elements are visible. However, Appium would return visible=false I would also like to mention that when you add more rows in the table (i.e. more instances of UIATableCell) the visible flag is sometimes true. I cannot find a stable scenario when this happens
The sample application can be found at https://github.com/danail-branekov/samples/tree/tableviewcell-visible-bug
Here is my environment
- OSX 10.9.2
- XCode/Instruments 5.1.1
- Appium 0.17.6
Thanks!
Regards, Danail
Issue Analytics
- State:
- Created 9 years ago
- Comments:22 (7 by maintainers)
Top GitHub Comments
@steher a HUGE thank you for you. The second link “Defining isAccessibilityElement In Your iOS Application” helped me addressed the issue where the tableView in my iOS app can’t be seen by the Appium Inspector. Thank you!!! Since the VCs are embedded in a NavCtrlr I have to turn off the NavCtrlr view accessibility so that the tableview becomes visible in the inspector.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.