Add tags/ID's to elements to facilitate automated UI testing with VisualRunners
Is your feature request related to a problem?
We're currently setting up Appium to do automated UI testing on a MAUI app that uses VisualRunners.
You can reference and interact with UI elements with Appium by their attributes.
Ie, if your XAML file for the page had the following:
<Button Text="Run All ►►"
Command="{Binding RunEverythingCommand}"
Style="{StaticResource RunButtonStyle}"
Grid.Column="1" />
You can use Appium to find an element with the text field "Run All ►►".
I would like to check the number of tests that have failed and the number that have succeeded through Appium, but those elements in the XAML page do not have any unique tags or identifiers.
Describe the solution you'd like
Add x:Name fields to the labels for the number of tests that have passed and failed.
<Label Text="✔" TextColor="{StaticResource SuccessfulTestsColor}" />
<Label x:Name="SuccessfulTestsCount" Text="{Binding Passed}" TextColor="{StaticResource SuccessfulTestsColor}" Margin="0,0,15,0" />
<Label Text="⛔" TextColor="{StaticResource FailedTestsColor}" />
<Label x:Name="FailedTestsCount" Text="{Binding Failed}" TextColor="{StaticResource FailedTestsColor}" Margin="0,0,15,0" />
<Label Text="⚠" TextColor="{StaticResource SkippedTestsColor}" />
<Label x:Name="SkippedTestsCount" Text="{Binding Skipped}" TextColor="{StaticResource SkippedTestsColor}" Margin="0,0,15,0" />
<Label Text="🔷" TextColor="{StaticResource NotRunTestsColor}" />
<Label x:Name="NotRanTestsCount" Text="{Binding NotRun}" TextColor="{StaticResource NotRunTestsColor}" />
Describe alternatives you've considered
Provide some kind of API to query the elements on the HomePage (as well as a way to query for the test results page) maybe.
Additional context
Let me know if there is already an existing & easier way to reference UI elements!