Skip to content

Commit b86dbbd

Browse files
authored
Merge pull request appium#151 from emil-petersen/master
Update python-client README to account for XCUITest-related changes
2 parents 14c222e + a7119e9 commit b86dbbd

File tree

1 file changed

+23
-1
lines changed

1 file changed

+23
-1
lines changed

README.md

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,10 @@ driver.switch_to.context(context_name)
122122
### Finding elements by iOS UIAutomation search
123123

124124
This allows elements in iOS applications to be found using recursive element
125-
search using the UIAutomation library. Adds the methods `driver.find_element_by_ios_uiautomation`
125+
search using the UIAutomation library. This method is supported on iOS devices
126+
that still support UIAutomation, that is, versions which predate XCUITEST.
127+
128+
Adds the methods `driver.find_element_by_ios_uiautomation`
126129
and `driver.find_elements_by_ios_uiautomation`.
127130

128131
```python
@@ -153,6 +156,25 @@ self.assertIsInstance(els, list)
153156
```
154157
155158
159+
### Finding elements by iOS predicates
160+
161+
This method allows finding elements using iOS predicates. The methods take a
162+
string in the format of a predicate, including element type and the value of
163+
fields.
164+
165+
Adds the methods
166+
`driver.find_element_by_ios_predicate` and `find_elements_by_ios_predicate`.
167+
168+
```python
169+
el = self.driver.find_element_by_ios_predicate('wdName == "Buttons"')
170+
self.assertIsNotNone(el)
171+
```
172+
173+
```python
174+
els = self.driver.find_elements_by_ios_predicate('wdValue == "SearchBar" AND isWDDivisible == 1')
175+
self.assertIsInstance(els, list)
176+
```
177+
156178
### Finding elements by Accessibility ID
157179
158180
Allows for elements to be found using the "Accessibility ID". The methods take a

0 commit comments

Comments
 (0)