Skip to content

Commit a7119e9

Browse files
committed
Update README to include instructions for using iOS predicates
1 parent 27c5d16 commit a7119e9

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,25 @@ self.assertIsInstance(els, list)
156156
```
157157
158158
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+
159178
### Finding elements by Accessibility ID
160179
161180
Allows for elements to be found using the "Accessibility ID". The methods take a

0 commit comments

Comments
 (0)