Skip to content

Commit 6714d50

Browse files
[webview_flutter] Fix XCUITest in Xcode 15 (flutter#5071)
For some reason tapping the "Done" button in the XCUITest stopped working in Xcode 15, but tapping it via coordinates works, so switch to that as a workaround. Fixes flutter#134971
1 parent 5badf97 commit 6714d50

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

packages/url_launcher/url_launcher_ios/example/ios/RunnerUITests/URLLauncherUITests.swift

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,12 @@ class URLLauncherUITests: XCTestCase {
3131
XCTAssertTrue(app.buttons["ForwardButton"].waitForExistence(timeout: 30.0))
3232
XCTAssertTrue(app.buttons["Share"].exists)
3333
XCTAssertTrue(app.buttons["OpenInSafariButton"].exists)
34-
app.buttons["Done"].tap()
34+
let doneButton = app.buttons["Done"]
35+
XCTAssertTrue(doneButton.waitForExistence(timeout: 30.0))
36+
// This should just be doneButton.tap, but for some reason that stopped working in Xcode 15;
37+
// tapping via coordinate works, however.
38+
doneButton.coordinate(withNormalizedOffset: CGVector()).withOffset(CGVector(dx: 10, dy: 10))
39+
.tap()
3540
}
3641
}
3742
}

0 commit comments

Comments
 (0)