Element State
- exists(測試以確定是否存在元素)
@property(readonly) BOOL exists;
- hittable (是否可以計算一個命中點的元素為合成事件的目的)
@property(readonly, getter=isHittable) BOOL hittable;
- debugDescription (提供有關(guān)元素的調(diào)試信息)
@property(readonly, copy) NSString *debugDescription;
———————————————————————————————————————
Querying Descendant Element
- -childrenMatchingType:(返回指定類型的元素的直接子類的查詢)
- (XCUIElementQuery *)childrenMatchingType:(XCUIElementType)type;
- -descendantsMatchingType: (返回指定類型的元素的所有子元素的查詢)
- (XCUIElementQuery *)descendantsMatchingType:(XCUIElementType)type;
———————————————————————————————————————
Typing Text
- -typeText:(將字符串類型轉(zhuǎn)換為元素)
- (void)typeText:(NSString *)text;
———————————————————————————————————————
Performing Gestures
- -tap(發(fā)送一個點擊事件到碰撞點的元計算)
- (void)tap;
- -doubleTap(發(fā)送一個雙擊事件到碰撞點的元計算)
- (void)doubleTap;
- -twoFingerTap(將一二個手指事件給打點的元計算。)
- (void)twoFingerTap;
- -pressForDuration(發(fā)送一個長按手勢在碰撞點的元計算粮坞,持有指定的時間)
- (void)pressForDuration:(NSTimeInterval)duration;
- -pressForDuration:thenDragToElement:(啟動一個按住手勢谬以,然后拖動到另一個元素)
- (void)pressForDuration:(NSTimeInterval)duration thenDragToElement:(XCUIElement *)otherElement;
- -swipeLeft(發(fā)送一個滑動左的手勢)
- (void)swipeLeft;;
- -swipeRight(發(fā)送一個滑動右的手勢)
- (void)swipeRight;
- -swipeUp (發(fā)送一個滑動向上的手勢)
- (void)swipeUp;;
- -swipeDown(發(fā)送一個滑動向下的手勢)
- (void) swipeDown;
- -pinchWithScale:velocity:(發(fā)送一個捏合的手勢)
- (void)pinchWithScale:(CGFloat)scale velocity:(CGFloat)velocity;;
- -rotate:withVelocity:(發(fā)送一個帶有兩個觸摸的旋轉(zhuǎn)手勢茅信。)
- (void)rotate:(CGFloat)rotation withVelocity:(CGFloat)velocity;;
———————————————————————————————————————
Interacting with Sliders —— 這些方法提供自動化的相互作用與UISlider和NSSlider的功能
- -normalizedSliderPosition(返回滑塊的指示器的位置抬纸,作為一個標準化的值掺涛,其中0對應于滑塊的最小值纽匙,1對應于它的最大值)
@property(readonly) CGFloat normalizedSliderPosition;
- -adjustToNormalizedSliderPosition:(操縱UI改變滑塊的顯示值為基于歸一化的位置厌丑。0對應于滑塊的最小值,1對應于它的最大值匹耕。調(diào)整是一個“最好的努力”將指標移動到所需的位置聚请;絕對的保真度是沒有保證的。)
- (void)adjustToNormalizedSliderPosition:(CGFloat)normalizedSliderPosition;
———————————————————————————————————————
Interacting with Pickers —— 該方法的自動化控制和uidatepicker UIPickerView輪選擇提供的功能
- -adjustToPickerWheelValue:(改變顯示值為拾取輪稳其。如果指定的值不可用驶赏,則會生成一個測試失敗)
- (void)adjustToPickerWheelValue:(NSString *)pickerWheelValue;
———————————————————————————————————————
Calculating Coordinates —— 創(chuàng)建和返回一個新的坐標與歸一化偏移
- -adjustToPickerWheelValue:(改變顯示值為拾取輪既鞠。如果指定的值不可用煤傍,則會生成一個測試失敗)
- (XCUICoordinate *)coordinateWithNormalizedOffset:(CGVector)normalizedOffset;
———————————————————————————————————————