Skip to content

Commit 73429cd

Browse files
feat: Add traits attributes (#2566)
* Docs: Added traits attributes * bump WDA version and mention that the traits attribute is not available in xml. * Update docs/reference/element-attributes.md Co-authored-by: Kazuaki Matsuo <fly.49.89.over@gmail.com> --------- Co-authored-by: Kazuaki Matsuo <fly.49.89.over@gmail.com>
1 parent e51f8e1 commit 73429cd

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

docs/reference/element-attributes.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,4 @@ The XCUITest driver supports the following element attributes:
2222
| `value` | Element's value. This is a complex attribute, whose calculation algorithm depends on the actual element type. Check [WebDriverAgent sources](https://github.com/appium/WebDriverAgent/blob/master/WebDriverAgentLib/Categories/XCUIElement%2BFBWebDriverAttributes.m) to know more about how it is compiled (method `- (NSString *)wdValue`). Could be `null` | `hello` |
2323
| `hittable` | Whether the element is [hittable](https://developer.apple.com/documentation/xctest/xcuielement/1500561-hittable). Note that XCTest hittable requires an element to have the [isAccessibilityElement](https://developer.apple.com/documentation/objectivec/nsobject-swift.class/isaccessibilityelement) property enabled. It means if the element is on screen, but it sets [accessibilityElementsHidden](https://developer.apple.com/documentation/objectivec/nsobject-swift.class/accessibilityelementshidden) to `false`, the hittable attribute will be `false`. This attribute is not included into the XML page source due to performance reasons, although you can use it in element locators or fetch its value using [getAttribute](https://www.w3.org/TR/webdriver2/#get-element-attribute) API. | `true` |
2424
|`placeholderValue` | Element's [placeolderValue](https://developer.apple.com/documentation/xctest/xcuielementattributes/placeholdervalue) value. | `Placeholder text`|
25+
|`traits` | Element's [traits](https://developer.apple.com/documentation/uikit/uiaccessibilitytraits?language=objc) value. This attribute returns a comma-separated string of accessibility traits. This attribute is not included into the XML page source, it may only be retrieved via [getAttribute](https://www.w3.org/TR/webdriver2/#get-element-attribute) API.| `Button, Adjustable`, `Button` |

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@
8181
"appium-ios-device": "^2.8.0",
8282
"appium-ios-simulator": "^6.2.2",
8383
"appium-remote-debugger": "^12.2.0",
84-
"appium-webdriveragent": "^9.6.2",
84+
"appium-webdriveragent": "^9.10.0",
8585
"appium-xcode": "^5.1.4",
8686
"async-lock": "^1.4.0",
8787
"asyncbox": "^3.0.0",

0 commit comments

Comments
 (0)