Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ namespace Microsoft.Maui.TestCases.Tests.Issues;

public class Issue34971 : _IssuesUITest
{
string doneButton => App is AppiumIOSApp iosApp && HelperExtensions.IsIOS26OrHigher(iosApp) ? "selected" : "Done";

public Issue34971(TestDevice device) : base(device)
{
}
Expand Down Expand Up @@ -37,15 +39,16 @@ public void PickerKeepsCharacterSpacingAfterSelectingItem()

// The picker is presented differently per platform, so it is dismissed differently:
// iOS/MacCatalyst confirm the wheel with a Done button (which selects the highlighted item),
// on iOS 26+ the button is labeled "selected" instead of "Done".
// Android dismisses with Cancel, and Windows dismisses by tapping outside the dropdown.
void CloseOpenedPicker()
{
#if ANDROID
App.WaitForElement("Cancel");
App.Tap("Cancel");
#elif IOS || MACCATALYST
App.WaitForElement("Done");
App.Tap("Done");
App.WaitForElement(doneButton);
App.Tap(doneButton);
#elif WINDOWS
App.TapCoordinates(10, 10);
#endif
Expand Down
Loading