iOS App UIAButton unable to get name with get_attribute('name')

I have several UIAButton elements on my iOS App with names.

I have used get_attribute(‘name’) to get the UIAButton name, but it always returns an empty string.

If I use get_attribute(‘name’) on a UIAStaticText the name is returned successfully.

How can I return the name property of a UIAButton.

Example of UIAButton xml:

<UIAButton name="Test 1" label="ON" value="" dom="" enabled="true" valid="true" visible="true" hint="" path="/0/0/2/0/12" x="55" y="243.5" width="50" height="50">
<UIAButton name=Test 2" label="OFF" value="" dom="" enabled="true" valid="true" visible="true" hint="" path="/0/0/2/0/13" x="135" y="243.5" width="50" height="50">

Python Code:
elements = driver.find_elements_by_xpath('//UIAApplication[1]/UIAWindow[1]/UIATableView[1]/UIATableCell[1]/UIAButton')
for el in elements:
    print('%s' % el.get_attribute('name'))

This is only a problem on UIAButton Elements in the UIATableView.

Try to print the page source before the find/getAttribute to try to figure out what is really there.

I realize that this thread is a bit old but I’m currently having the exact same problem described by this post. I also believe it’s a bug related to accessing the “value” attribute from a UIAButton. @sebv, I tried printing the page source (driver.getPageSource() ) immediately before checking for the UIAButton value and it comes up as empty. I am able to use get Attribute(“value”) on elements such as UIATextView with no problem.

Please see the related thread that I posted about one month ago: iOS: getAttribute("value") works for some elements, returns empty String for others
This thread explains my problem and contains screenshots and logs.

Is there any way to escalate this and confirm whether or not it is a bug?

Edit: The buttons that I’m trying to retrieve the “value” attribute from are also in a UIATableView, which corroborates what was reported by @Paul