diff --git a/testing/scenario_app/ios/Scenarios/ScenariosUITests/UnobstructedPlatformViewTests.m b/testing/scenario_app/ios/Scenarios/ScenariosUITests/UnobstructedPlatformViewTests.m index 2d3db20b4e7a9..73186b0ba00a2 100644 --- a/testing/scenario_app/ios/Scenarios/ScenariosUITests/UnobstructedPlatformViewTests.m +++ b/testing/scenario_app/ios/Scenarios/ScenariosUITests/UnobstructedPlatformViewTests.m @@ -25,7 +25,7 @@ - (void)testNoOverlay { [app launch]; XCUIElement* platform_view = app.textViews[@"platform_view[0]"]; - XCTAssertTrue(platform_view.exists); + XCTAssertTrue([platform_view waitForExistenceWithTimeout:1.0]); XCTAssertEqual(platform_view.frame.origin.x, 25); XCTAssertEqual(platform_view.frame.origin.y, 25); XCTAssertEqual(platform_view.frame.size.width, 250); @@ -47,7 +47,7 @@ - (void)testOneOverlay { [app launch]; XCUIElement* platform_view = app.textViews[@"platform_view[0]"]; - XCTAssertTrue(platform_view.exists); + XCTAssertTrue([platform_view waitForExistenceWithTimeout:1.0]); XCTAssertEqual(platform_view.frame.origin.x, 25); XCTAssertEqual(platform_view.frame.origin.y, 25); XCTAssertEqual(platform_view.frame.size.width, 250); @@ -72,7 +72,7 @@ - (void)testOneOverlayPartialIntersection { [app launch]; XCUIElement* platform_view = app.textViews[@"platform_view[0]"]; - XCTAssertTrue(platform_view.exists); + XCTAssertTrue([platform_view waitForExistenceWithTimeout:1.0]); XCTAssertEqual(platform_view.frame.origin.x, 25); XCTAssertEqual(platform_view.frame.origin.y, 25); XCTAssertEqual(platform_view.frame.size.width, 250); @@ -100,7 +100,7 @@ - (void)testTwoIntersectingOverlays { [app launch]; XCUIElement* platform_view = app.textViews[@"platform_view[0]"]; - XCTAssertTrue(platform_view.exists); + XCTAssertTrue([platform_view waitForExistenceWithTimeout:1.0]); XCTAssertEqual(platform_view.frame.origin.x, 25); XCTAssertEqual(platform_view.frame.origin.y, 25); XCTAssertEqual(platform_view.frame.size.width, 250); @@ -129,7 +129,7 @@ - (void)testOneOverlayAndTwoIntersectingOverlays { [app launch]; XCUIElement* platform_view = app.textViews[@"platform_view[0]"]; - XCTAssertTrue(platform_view.exists); + XCTAssertTrue([platform_view waitForExistenceWithTimeout:1.0]); XCTAssertEqual(platform_view.frame.origin.x, 25); XCTAssertEqual(platform_view.frame.origin.y, 25); XCTAssertEqual(platform_view.frame.size.width, 250); @@ -163,7 +163,7 @@ - (void)testMultiplePlatformViewsWithoutOverlays { [app launch]; XCUIElement* platform_view1 = app.textViews[@"platform_view[0]"]; - XCTAssertTrue(platform_view1.exists); + XCTAssertTrue([platform_view1 waitForExistenceWithTimeout:1.0]); XCTAssertEqual(platform_view1.frame.origin.x, 25); XCTAssertEqual(platform_view1.frame.origin.y, 325); XCTAssertEqual(platform_view1.frame.size.width, 250); @@ -193,7 +193,7 @@ - (void)testMultiplePlatformViewsWithOverlays { [app launch]; XCUIElement* platform_view1 = app.textViews[@"platform_view[0]"]; - XCTAssertTrue(platform_view1.exists); + XCTAssertTrue([platform_view1 waitForExistenceWithTimeout:1.0]); XCTAssertEqual(platform_view1.frame.origin.x, 25); XCTAssertEqual(platform_view1.frame.origin.y, 325); XCTAssertEqual(platform_view1.frame.size.width, 250); @@ -235,7 +235,7 @@ - (void)testPlatformViewsMaxOverlays { [app launch]; XCUIElement* platform_view = app.textViews[@"platform_view[0]"]; - XCTAssertTrue(platform_view.exists); + XCTAssertTrue([platform_view waitForExistenceWithTimeout:1.0]); XCTAssertEqual(platform_view.frame.origin.x, 25); XCTAssertEqual(platform_view.frame.origin.y, 25); XCTAssertEqual(platform_view.frame.size.width, 250);