18 {
19 if (@available(iOS 13, *)) {
20 XCUIApplication* systemApp =
21 [[XCUIApplication alloc] initWithBundleIdentifier:@"com.apple.springboard"];
22 XCUIElement* statusBar = [systemApp.statusBars firstMatch];
23 if (statusBar.isHittable) {
24 [statusBar tap];
25 } else {
26 XCUICoordinate* coordinates = [statusBar coordinateWithNormalizedOffset:CGVectorMake(0, 0)];
27 [coordinates tap];
28 }
29 } else {
30 [[self.application.statusBars firstMatch] tap];
31 }
32
33 XCUIElement* addTextField =
34 self.application
35 .textFields[@"0,PointerChange.add,device=0,buttons=0,signalKind=PointerSignalKind.none"];
36 BOOL exists = [addTextField waitForExistenceWithTimeout:1];
37 XCTAssertTrue(exists, @"");
38 XCUIElement* downTextField =
39 self.application
40 .textFields[@"1,PointerChange.down,device=0,buttons=0,signalKind=PointerSignalKind.none"];
41 exists = [downTextField waitForExistenceWithTimeout:1];
42 XCTAssertTrue(exists, @"");
43 XCUIElement* upTextField =
44 self.application
45 .textFields[@"2,PointerChange.up,device=0,buttons=0,signalKind=PointerSignalKind.none"];
46 exists = [upTextField waitForExistenceWithTimeout:1];
47 XCTAssertTrue(exists, @"");
48}