jeudi 13 octobre 2016

iOS UITests Assert UITextFiled'text failed

XCTAssertTrue(textField.exists, @"TextField is not exist");
[textField tap];
[textField typeText:@"123"];

XCUIElement *textField2 = [[element childrenMatchingType:XCUIElementTypeTextField] elementBoundByIndex:1];

[textField2 tap];

XCTAssertTrue(textField2.exists, @"TextField2 is not exist");

[textField2 tap];

[textField2 typeText:@"123"];

XCTAssertEqual(textField2.value, @"123", @"account is not correct");

error message:

((textField2.value) equal to (@"123")) failed:("<12333303 000000a0>") is not equal to ("<b0f26a13 01000000>") - account is not correct
[app.buttons[@"\u767b\u5f55"] tap];

Aucun commentaire:

Enregistrer un commentaire