Skip to content

Commit f0c15c5

Browse files
authored
update documentations in xcuitest (#444)
1 parent 67114d1 commit f0c15c5

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

docs/ios_xcuitest.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,12 @@ find_element(:class, button_class) # Return a element of XCUIElementTypeButton f
3030
find_element(:accessibility_id, element) # Return a element which has accessibilityIdentifier, `element`.
3131
```
3232

33+
- `button/s(value)`, `button_exact/buttons_exact`, `text/s(value)`, `text_exact/texts_exact`
34+
```ruby
35+
buttons(value) # Return button elements include `value` as its name attributes.
36+
```
37+
38+
3339
### with XPath
3440
- It is better to avoid XPath strategy.
3541
- https://github.com/appium/appium/blob/v1.6.2/docs/en/advanced-concepts/migrating-to-xcuitest.md#xpath-locator-strategy
@@ -41,12 +47,11 @@ find_element(:accessibility_id, element) # Return a element which has accessibil
4147
- https://github.com/facebook/WebDriverAgent/blob/2158a8d0f305549532f1338fe1e4628cfbd53cd9/WebDriverAgentLib/Categories/XCElementSnapshot%2BFBHelpers.m#L57
4248

4349
#### examples
44-
- `button/s(value)`, `textfield/s(value)`, `text/s(value)` uses XPath in their method. So, these methods are slower than other find_element directly.
50+
- `textfield/s(value)`, `find/s`, `find_exact/finds_exact` uses XPath in their method. So, these methods are slower than other find_element directly.
4551

4652
```ruby
47-
button(value) # Return a XCUIElementTypeButton element which has `value` text.
4853
textfield(value) # Return a XCUIElementTypeSecureTextField or XCUIElementTypeTextField element which has `value` text.
49-
text(value) # Return a XCUIElementTypeStaticText element which has `value` text.
54+
finds_exact(value) # Return any elements include `value` as its name attributes.
5055
```
5156

5257
## Other actions

0 commit comments

Comments
 (0)