I am using Xamarin Test Recorder for generating some UITests. However it seems like there are some problems with it. After researching here and in forums.xamarin.com I did not come up with a solution for my problem.
So here is the problem:
To use the Test Recorder correctly I added StyleIds to my Pages and Controls. After invoking the REPL it was looking fine until I came across a little bit more complicated controls.
The StyleId is shown on the standard controls like buttons or textfields. But when I hit e.g. a carouselview with some more pages in it, the Id does not even show up in the REPL.
If you take look on the code below, you will see that there is a StyleID and even an AutomationId set on the element but it is not showing up in the REPL (screenshot).
<selectSearchMaintenanceType:SelectSearchMaintenanceType Grid.Row="0" Grid.Column="1"
viewValidation:ViewValidationAttachedAttributes.MustSet="True"
SelectedValue="{Binding MaintenanceType}"
StyleId="SelectMaintenanceType"
AutomationId="SelectType"
Margin="0,10,0,0" />
<labelCustom:LabelCustom Grid.Row="1" Grid.Column="0" FontAttributes="Bold"
VerticalOptions="CenterAndExpand"
Text="{x:Static resources:AppResources.General_Technician1}"
Margin="0,10,0,0" />
<selectSearchTechnician:SelectSearchTechnician Grid.Row="1" Grid.Column="1"
SelectedValue="{Binding Technician1}" Margin="0,10,0,0"
StyleId="Technician"
AutomationId="Technician"/>
<labelCustom:LabelDefine Grid.Row="2" Grid.Column="0" FontAttributes="Bold"
VerticalOptions="CenterAndExpand"
DefineName="{x:Static utils:DatabaseUtils.DefineBaseTextboxSelectStKenn}"
DefaultValue="{x:Static resources:AppResources.AlertNewSelectsView_Cause}"
Postfix=":"
Margin="0,10,0,0" />
<selectSearchCause:SelectSearchCause Grid.Row="2" Grid.Column="1"
VerticalOptions="CenterAndExpand"
StyleId="SelectSearchCause"
AutomationId="SelectSearchCause"
SelectedValue="{Binding Cause}"
StructureClass="{Binding StructureClass, Mode=TwoWay}"
viewValidation:ViewValidationAttachedAttributes.IsproTag="Cause"
Margin="0,10,0,0" />
<labelCustom:LabelCustom Grid.Row="3" Grid.Column="0" FontAttributes="Bold"
VerticalOptions="CenterAndExpand"
Text="{x:Static resources:AppResources.AlertNewSelectsView_CauseOfError}"
Margin="0,10,0,0" />
<selectSearchErrorCause:SelectSearchErrorCause Grid.Row="3" Grid.Column="1"
VerticalOptions="CenterAndExpand"
SelectedValue="{Binding CauseOfError}"
StructureClass="{Binding StructureClass}"
StyleId="ErrorCause"
AutomationId="ErrorCause"
Margin="0,10,0,0"
viewValidation:ViewValidationAttachedAttributes.IsproTag="CauseOfError" />
<labelCustom:LabelCustom Grid.Row="4" Grid.Column="0" FontAttributes="Bold"
VerticalOptions="CenterAndExpand"
Text="{x:Static resources:AppResources.AlertNewSelectsView_Priority}"
Margin="0,10,0,0"
viewValidation:ViewValidationAttachedAttributes.IsproTag="Priority" />
<selectToggleButtonPriority:SelectToggleButtonPriority Grid.Row="5" Grid.Column="0" Grid.ColumnSpan="2"
VerticalOptions="CenterAndExpand"
StyleId="ButtonPriority"
AutomationId="PriorityButton"
SelectedValue="{Binding Priority}"
Margin="0,10,0,0"
viewValidation:ViewValidationAttachedAttributes.IsproTag="Priority" />
I found another let's call it "bug" with the Ids. If you create your own UIElement e.g. with Bindable Properties the StyleId is not showing up either.
The main problem is that I am not able to use UITest for my App as long as that is not working.
Is there any workaround or solution for my problem?
Aucun commentaire:
Enregistrer un commentaire