UI Test
This commit is contained in:
@@ -39,4 +39,135 @@
|
||||
[super tearDown];
|
||||
}
|
||||
|
||||
- (void)test
|
||||
{
|
||||
XCUIApplication *app = [[XCUIApplication alloc] init];
|
||||
XCUIElement *tButton = app.buttons[@"T"];
|
||||
[tButton tap];
|
||||
|
||||
XCUIElement *eButton = app.buttons[@"E"];
|
||||
[eButton tap];
|
||||
[app.buttons[@"S"] tap];
|
||||
[tButton tap];
|
||||
|
||||
XCUIElement *element =
|
||||
[[[[[[app childrenMatchingType:XCUIElementTypeWindow]
|
||||
elementBoundByIndex:0]
|
||||
childrenMatchingType:XCUIElementTypeOther]
|
||||
.element childrenMatchingType:XCUIElementTypeOther]
|
||||
elementBoundByIndex:1] childrenMatchingType:XCUIElementTypeOther]
|
||||
.element;
|
||||
XCUIElement *staticText = [[element
|
||||
childrenMatchingType:XCUIElementTypeStaticText] elementBoundByIndex:4];
|
||||
[staticText tap];
|
||||
|
||||
[app.sheets[@"Load or replace?"].collectionViews.buttons[@"Replace"] tap];
|
||||
|
||||
[eButton tap];
|
||||
|
||||
XCUIElement *dButton = app.buttons[@"D"];
|
||||
[dButton tap];
|
||||
[dButton tap];
|
||||
[app.buttons[@"F"] tap];
|
||||
|
||||
XCUIElement *staticText2 = [[element
|
||||
childrenMatchingType:XCUIElementTypeStaticText] elementBoundByIndex:3];
|
||||
[staticText2 tap];
|
||||
[eButton tap];
|
||||
[dButton tap];
|
||||
[dButton tap];
|
||||
|
||||
XCUIElement *mButton = app.buttons[@"M"];
|
||||
[mButton tap];
|
||||
|
||||
XCUIElement *staticText3 = [[element
|
||||
childrenMatchingType:XCUIElementTypeStaticText] elementBoundByIndex:7];
|
||||
[staticText3 tap];
|
||||
|
||||
XCUIElement *rTEButton = app.buttons[@"R T E"];
|
||||
[rTEButton tap];
|
||||
[dButton tap];
|
||||
[app.buttons[@"K"] tap];
|
||||
|
||||
XCUIElement *bButton = app.buttons[@"B"];
|
||||
[bButton tap];
|
||||
[staticText tap];
|
||||
[tButton tap];
|
||||
|
||||
XCUIElement *numButton = app.buttons[@"NUM"];
|
||||
[numButton tap];
|
||||
|
||||
XCUIElement *button = app.buttons[@"1"];
|
||||
[button tap];
|
||||
|
||||
XCUIElement *button2 = app.buttons[@"0"];
|
||||
[button2 tap];
|
||||
|
||||
XCUIElement *button3 = app.buttons[@"4"];
|
||||
[button3 tap];
|
||||
[staticText3 tap];
|
||||
[app.buttons[@"LET"] tap];
|
||||
[bButton tap];
|
||||
[app.buttons[@"U"] tap];
|
||||
[app.buttons[@"R"] tap];
|
||||
[app.buttons[@"A"] tap];
|
||||
[mButton tap];
|
||||
|
||||
XCUIElement *staticText4 = [[element
|
||||
childrenMatchingType:XCUIElementTypeStaticText] elementBoundByIndex:8];
|
||||
[staticText4 tap];
|
||||
|
||||
XCUIElement *pERFButton = app.buttons[@"P E R F"];
|
||||
[pERFButton tap];
|
||||
[numButton tap];
|
||||
|
||||
XCUIElement *button4 = app.buttons[@"5"];
|
||||
[button4 tap];
|
||||
|
||||
XCUIElement *button5 = app.buttons[@"."];
|
||||
[button5 tap];
|
||||
[button2 tap];
|
||||
[staticText2 tap];
|
||||
[button3 tap];
|
||||
|
||||
XCUIElement *button6 = app.buttons[@"6"];
|
||||
[button6 tap];
|
||||
[button5 tap];
|
||||
|
||||
XCUIElement *button7 = app.buttons[@"2"];
|
||||
[button7 tap];
|
||||
[staticText3 tap];
|
||||
[button4 tap];
|
||||
[button5 tap];
|
||||
[button2 tap];
|
||||
[[[element childrenMatchingType:XCUIElementTypeStaticText]
|
||||
elementBoundByIndex:11] tap];
|
||||
[button4 tap];
|
||||
[button tap];
|
||||
[button5 tap];
|
||||
[button7 tap];
|
||||
[app.staticTexts[@"46.2"] tap];
|
||||
[button4 tap];
|
||||
[button6 tap];
|
||||
[button5 tap];
|
||||
[button7 tap];
|
||||
[[[element childrenMatchingType:XCUIElementTypeStaticText]
|
||||
elementBoundByIndex:15] tap];
|
||||
[app.buttons[@"8"] tap];
|
||||
[button4 tap];
|
||||
[app.staticTexts[@"COST INDEX"] tap];
|
||||
[app.staticTexts[@"FLIGHT LVL"] tap];
|
||||
[staticText tap];
|
||||
[button7 tap];
|
||||
[button4 tap];
|
||||
[button2 tap];
|
||||
[staticText4 tap];
|
||||
[button4 tap];
|
||||
[[[element childrenMatchingType:XCUIElementTypeStaticText]
|
||||
elementBoundByIndex:12] tap];
|
||||
|
||||
XCUIElement *mENUButton = app.buttons[@"M E N U"];
|
||||
[mENUButton tap];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
Reference in New Issue
Block a user