enisn / UraniumUI

Uranium is a Free & Open-Source UI Kit for MAUI.
Apache License 2.0
1.19k stars 143 forks source link

Bindable AutomationIds in InputFields and maybe some other controls are missing #753

Closed KonstantinKellermann closed 2 months ago

KonstantinKellermann commented 2 months ago

We are experiencing issues when trying to run UI tests using Appium for our .NET MAUI application, where we use UraniumUI.Material version 2.9.1.

We are facing problems with TextField and other UraniumUI controls. Appium can detect the AutomationId, but it seems like the AutomationId is set incorrectly — it appears it is set to the Grid the InputField inherits from and not the actual input field. As a result, Appium cannot interact with the TextField to write input.

We created a custom TextField based on the UraniumUI TextField and added a BindableProperty for setting the AutomationId. This solution worked for us and allowed Appium to interact correctly with the control.

Proposal: The BindableProperty for the AutomationId should be set inside the controls like TextField and EditorField and potentially other UraniumUI controls, to ensure proper interaction in UI tests.