How do I FindChild / FindAllChildren and Touch in iOS?
I'm new(er) to test automation and have been building an iOS project off and on for a few months. I have not done a lot of scripting, but can figure it out as needed. I'm using Python.
I'm faced with a CollectionView that has numerous CollectionViewCells. The labels within each cell will change based on the current settings. I want to be able to use something like FindChild or FindAllChildren to search for the properties of the label (ex:labelxyz) within the CollectionView. When found, I want to Touch it. From the help articles, I'm guessing I want to use FindAllChildren.
I want to try this method because I can't map the label as it floats around among several cells depending on the data.
Questions:
1) Is this the best method or approach?
2) If so, is there a way to do this with If/Then logic from the Operations menu?
3) If not, can someone please give me an example of scripting something like this in Python?
The CollectionView (CollectionView(3)) remains constant. The label can be found in any one of 20+ CollectionViewCells.
The full name example is:
Mobile.Device("iPad").Process("MyApp").Window(0).CollectionView(3).CollectionViewCell(0).Label("LabelToTouch")