This is a migrated thread and some comments may be shown as answers.

Cannot find by automationID after update

1 Answer 110 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
David
Top achievements
Rank 1
David asked on 16 Jan 2017, 05:00 PM

Hi,

After updating to the newest version of Telerik Testing Framework new automation IDs are not recognised. The old ones (created before the update) work, but the new ones that I have added are not recognised and when the tests are run and I recieve an "element not found" error.

I think I am adding in the ID correctly (this is how I always used to add them in before). Please see the example below:

What is written in the Xaml:

<ListBox AutomationProperties.AutomationId="Menu_Model_Type_ListBox"
                                         Height="Auto"
                                         MaxWidth="250"
                                         ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                                         ScrollViewer.VerticalScrollBarVisibility="Disabled"
                                         HorizontalAlignment="Stretch"
                                         ItemsSource="{Binding ModelTypes}">
                                    <ListBox.ItemTemplate>.....

 

What is written in the Test:

ArtOfTest.WebAii.Controls.Xaml.Wpf.ListBox modelTypeListBox =
               app.MainWindow.Find.ByAutomationId<ArtOfTest.WebAii.Controls.Xaml.Wpf.ListBox>("Menu_Model_Type_ListBox");

 

 

Any idea what could be causing this error? These elements are definitely there (and of the correct type etc.).

Many thanks in advance for your help.

Best regards,

David

1 Answer, 1 is accepted

Sort by
0
Nikolay Petrov
Telerik team
answered on 19 Jan 2017, 02:14 PM
Hello David,

Thank you for your interest in out product.

I created sample WPF app using provided ListBox sample element. It worked exception free.

Please, provide sample app that we could be used to reproduce this problem.

I hope to hear soon from you.

Regards,
Nikolay Petrov
Telerik by Progress
 
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
 
Tags
General Discussions
Asked by
David
Top achievements
Rank 1
Answers by
Nikolay Petrov
Telerik team
Share this question
or