Hi tolga. I would go through the appium tutorials online to help with your questions.
For good topics on your specific locator strategies, I pulled these links.
Good luck!
Ui automation
Click on Locator in the Appium GUI
Select strategy “ios-uiautomation”
Test your locators
This locator should work if you paste it into the “value” section in the Appium GUI:
.tableViews()[0].cells().firstWithPredicate("name beginswith 'Page Control'")
Example locator for UICatalog as you would use it in code:
locator = '.tableViews()[0].cells().firstWithPredicate("name beginswith \'Page Control\'")'
driver.find_element_by_ios_uiautomation(locator).click() # click on the element
Xpath
I have following hierarchy in my native IOS application:
UIATableView
TableCell
UIATextView
UIATextField
UIATextField
TableCell
UIATextView
UIATextField
UIATextField
Now I want to write Xpath query which will fetch me the first child of each TableCell element using FindElementsByXpath()method.
I have written following xpath quey to achieve this:
//UIATableView/child::UIATableCell/child::[position()=1]
OR
//UIATableView/child::UIATableCell/child::[1]
both of these queries retur…
Uiautomator general info
https://docs.saucelabs.com/tutorials/appium/