Python how to get count of UIATableCell in iOS real device

Hi Friends,

I am trying to get count/size of ‘UIATableCell’ from ‘UIATableView’ in iOS real device.
Here’s what I do in python.
1.cells= driver.find_element_by_class_name(“UIATableCell”).size
print cells
the result:
weight and Hight
2.cells= driver.find_element_by_class_name(“UIATableCell”).size()
print cells
the result:
null
Can anyone help me …

Hi @panixi2015:

So what you have will not work. You are saying “give me the size of a given cell” which will either be 1 or null.

I use ruby, but the same identifier converting in your syntax should work:

   @courseOutlineList = {uiautomation: ".scrollViews()[1].tableViews()[0].cells()"}

This is saying: " give me all the cells in the first table view within the 2nd scroll view (Ui automation is 0 based)"

Then find_elements(@courseOutlineList).size should work ( again convert for your syntax )

Hope this helps! Feel free to reply with follow-up questions!

Eric