Skip to content

Commit cf4a5a9

Browse files
committed
append class chain related descriptions
1 parent dc0c359 commit cf4a5a9

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,27 @@ els = self.driver.find_elements_by_ios_predicate('wdValue == "SearchBar" AND isW
175175
self.assertIsInstance(els, list)
176176
```
177177
178+
179+
### Finding elements by iOS class chain
180+
181+
**This method is only for [XCUITest driver](https://github.com/appium/appium-xcuitest-driver)**
182+
183+
This method allows finding elements using iOS class chain. The methods take
184+
a string in the format of a class chain, including element type.
185+
186+
Adds the methods
187+
`driver.find_element_by_ios_class_chain` and `find_elements_by_class_chain`.
188+
189+
```python
190+
el = self.driver.find_element_by_ios_class_chain('XCUIElementTypeWindow/XCUIElementTypeButton[3]')
191+
self.assertIsNotNone(el)
192+
```
193+
194+
```python
195+
els = self.driver.find_elements_by_class_chain('XCUIElementTypeWindow/XCUIElementTypeButton')
196+
self.assertIsInstance(els, list)
197+
```
198+
178199
### Finding elements by Accessibility ID
179200
180201
Allows for elements to be found using the "Accessibility ID". The methods take a

0 commit comments

Comments
 (0)