question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Table cell child elements have "visible" attribute set to false

See original GitHub issue

Hi,

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:closed
  • Created 9 years ago
  • Comments:22 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
iAmNazcommented, Aug 17, 2015

@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.

0reactions
lock[bot]commented, Apr 30, 2019

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

visibility - CSS: Cascading Style Sheets - MDN Web Docs
The visibility CSS property shows or hides an element without changing the layout of a document. The property can also hide rows or...
Read more >
Why is visible="false" not working for a plain html table?
You have two options, one is to use the display:none attribute. Or two wrap the table in a div and make the div...
Read more >
HTML table hidden Attribute - Dofactory
The hidden attribute on a table element hides that element. Althought not visible, the element's position on the page is maintained.
Read more >
visibility - CSS-Tricks
The visibility property in CSS has two different functions. It hides rows and columns of a table, and it also hides an element...
Read more >
HTML DOM Style visibility Property - W3Schools
collapse, When used on a table row or cell, the element is not visible (same as "hidden"). initial, Sets this property to its...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found