File tree Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -192,6 +192,11 @@ extern NSString *const inputFieldTestString;
192
192
*/
193
193
- (void )activateCustomActionWithName:(NSString *)name expectedResult:(BOOL )expectedResult;
194
194
195
+ /* !
196
+ @abstract Activates a found element via `accessibilityActivate()`.
197
+ @param expectedResult The expected boolean return from activation of the element.
198
+ */
199
+ - (void )performAccessibilityActivateWithExpectedResult:(BOOL )expectedResult;
195
200
196
201
#pragma mark Waiting & Finding
197
202
Original file line number Diff line number Diff line change @@ -411,7 +411,20 @@ - (void)activateCustomActionWithName:(NSString *)name expectedResult:(BOOL)expec
411
411
return KIFTestStepResultFailure;
412
412
}];
413
413
}
414
+ }
414
415
416
+ - (void )performAccessibilityActivateWithExpectedResult : (BOOL )expectedResult ;
417
+ {
418
+ @autoreleasepool {
419
+ KIFUIObject *found = [self _predicateSearchWithRequiresMatch: YES mustBeTappable: YES ];
420
+
421
+ [self runBlock: ^KIFTestStepResult (NSError **error) {
422
+ if ([found.element accessibilityActivate ] == expectedResult) {
423
+ return KIFTestStepResultSuccess;
424
+ }
425
+ return KIFTestStepResultFailure;
426
+ }];
427
+ }
415
428
}
416
429
417
430
#pragma mark - Scroll/Table/CollectionView Actions
You can’t perform that action at this time.
0 commit comments