-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Description
Description
When running MAUI UI tests (Appium / WebDriverAgent), querying an element whose accessibility identifier (or label/title/value) exceeds 128 characters triggers a failure.
Error: OpenQA.Selenium.UnknownErrorException: An unknown server-side error occurred while processing the command. Original error: Invalid query - string identifier 'This is a very long title that should wrap properly to multiple lines instead of being truncated or causing horizontal overflow issues like it might on Windows' exceeds maximum length of 128 characters. You can work around this limitation by constructing a query with a custom NSPredicate that specifies the property (label, title, value, placeholderValue, or identifier) to match against.
Steps to Reproduce
This issue appears e.g. with ActionSheetWithManyActionsShouldDisplayProperly
when re-enabled (it happens only on macOS, as iOS shortens it).
Do something like something like
App.WaitForElement("This is a very long title that should wrap properly to multiple lines instead of being truncated or causing horizontal overflow issues like it might on Windows");
Link to public reproduction project repository
Version with bug
10.0.0-preview.7
Is this a regression from previous behavior?
No, this is something new
Last version that worked well
No response
Affected platforms
macOS, iOS
Affected platform versions
No response
Did you find any workaround?
Use an NSPredicate-based query manually (if the harness allows), e.g.: (name == 'full long string') OR (label == 'full long string') Or shorten the AutomationId/text below 129 chars (not ideal/possible in case of some controls, e.g. ActionSheet).