diff --git a/packages/url_launcher/url_launcher_ios/CHANGELOG.md b/packages/url_launcher/url_launcher_ios/CHANGELOG.md index c00d6abce38..b2c1a45be5d 100644 --- a/packages/url_launcher/url_launcher_ios/CHANGELOG.md +++ b/packages/url_launcher/url_launcher_ios/CHANGELOG.md @@ -1,3 +1,7 @@ +## NEXT + +* Fixes integration test button text matcher to work on iOS 26. + ## 6.3.4 * Updates to Pigeon 25.5.0. diff --git a/packages/url_launcher/url_launcher_ios/example/ios/RunnerUITests/URLLauncherUITests.swift b/packages/url_launcher/url_launcher_ios/example/ios/RunnerUITests/URLLauncherUITests.swift index 20b8c1bfec8..18a4e8e8170 100644 --- a/packages/url_launcher/url_launcher_ios/example/ios/RunnerUITests/URLLauncherUITests.swift +++ b/packages/url_launcher/url_launcher_ios/example/ios/RunnerUITests/URLLauncherUITests.swift @@ -28,10 +28,11 @@ class URLLauncherUITests: XCTestCase { button.tap() let webView = app.webViews.firstMatch XCTAssertTrue(webView.waitForExistence(timeout: 30.0)) - XCTAssertTrue(app.buttons["ForwardButton"].waitForExistence(timeout: 30.0)) - XCTAssertTrue(app.buttons["Share"].exists) - XCTAssertTrue(app.buttons["OpenInSafariButton"].exists) - let doneButton = app.buttons["Done"] + XCTAssertTrue(app.buttons["OpenInSafariButton"].waitForExistence(timeout: 30.0)) + + // iOS 18 is "Done". iOS 26 is "Close". + let doneButtonPredicate = NSPredicate(format: "label = 'Close' OR label = 'Done'") + let doneButton = app.buttons.element(matching: doneButtonPredicate).firstMatch XCTAssertTrue(doneButton.waitForExistence(timeout: 30.0)) // This should just be doneButton.tap, but for some reason that stopped working in Xcode 15; // tapping via coordinate works, however.