@@ -31,15 +31,34 @@ - (void)testPlayVideo {
3131 [playButton tap ];
3232
3333 XCUIElement *playbackSpeed1x = app.staticTexts [@" 1.0x\n Playback speed" ];
34- XCTAssertTrue ([playbackSpeed1x waitForExistenceWithTimeout: 30.0 ]);
34+ BOOL foundPlaybackSpeed1x = [playbackSpeed1x waitForExistenceWithTimeout: 30.0 ];
35+ if (!foundPlaybackSpeed1x) {
36+ // Some old flutter version uses a different accessibility value for tooltips.
37+ // We try to find the button if the old accessibility value is used.
38+ // TODO(cyanglaz): Remove this when the new accessibility value is supported on flutter/stable
39+ // https://github.com/flutter/flutter/issues/102771
40+ playbackSpeed1x = app.staticTexts [@" Playback speed\n 1.0x\n " ];
41+ foundPlaybackSpeed1x = [playbackSpeed1x waitForExistenceWithTimeout: 30.0 ];
42+ }
43+ XCTAssertTrue (foundPlaybackSpeed1x);
3544 [playbackSpeed1x tap ];
3645
3746 XCUIElement *playbackSpeed5xButton = app.buttons [@" 5.0x" ];
3847 XCTAssertTrue ([playbackSpeed5xButton waitForExistenceWithTimeout: 30.0 ]);
3948 [playbackSpeed5xButton tap ];
4049
4150 XCUIElement *playbackSpeed5x = app.staticTexts [@" 5.0x\n Playback speed" ];
42- XCTAssertTrue ([playbackSpeed5x waitForExistenceWithTimeout: 30.0 ]);
51+ BOOL foundPlaybackSpeed5x = [playbackSpeed5x waitForExistenceWithTimeout: 30.0 ];
52+ if (!foundPlaybackSpeed5x) {
53+ // Some old flutter version uses a different accessibility value for tooltips.
54+ // We try to find the button if the old accessibility value is used.
55+ // TODO(cyanglaz): Remove this when the new accessibility value is supported on flutter/stable
56+ // https://github.com/flutter/flutter/issues/102771
57+ playbackSpeed5x = app.staticTexts [@" Playback speed\n 5.0x\n " ];
58+ foundPlaybackSpeed5x = [playbackSpeed5x waitForExistenceWithTimeout: 30.0 ];
59+ }
60+ XCTAssertTrue (foundPlaybackSpeed5x);
61+ [playbackSpeed5x tap ];
4362
4463 // Cycle through tabs.
4564 for (NSString *tabName in @[ @" Asset" , @" Remote" ]) {
0 commit comments