——描述由用户界面元素暴露的属性
——这些属性表示暴露于可访问系统中的数据,并在查询匹配过程中可用。
———————————————————————————————————————
Identity
- elementType(该元素的XCUIElementType)
@property(readonly) XCUIElementType elementType;
- identifier (元素的可访问性标识符)
@property(readonly) NSString *identifier;
———————————————————————————————————————
Value
- value(元素的原始值属性)
@property(readonly) id value;
- placeholderValue (当元素没有值时显示的值)
@property(readonly) NSString *placeholderValue;
- title(元素的标题属性)
@property(readonly, copy) NSString *title;
- label(元素的标签属性)
@property(readonly, copy) NSString *label;
———————————————————————————————————————
Interaction State
- hasFocus(是否元素有用户界面焦点)
@property(readonly) BOOL hasFocus;
- enabled (是否启用用户交互的元素)
@property(readonly, getter=isEnabled) BOOL enabled;
- selected(是否选择了元素)
@property(readonly, getter=isSelected) BOOL selected;
———————————————————————————————————————
Size
- frame(屏幕坐标空间中的元素的框架)
@property(readonly) CGRect frame;
- horizontalSizeClass (元素的水平大小类)
@property(readonly) XCUIUserInterfaceSizeClass horizontalSizeClass;
- verticalSizeClass(元素的垂直大小类)
@property(readonly) XCUIUserInterfaceSizeClass verticalSizeClass;
———————————————————————————————————————
网友评论