Cannot find by automationID after update

2 posts, 0 answers
  1. David
    David avatar
    21 posts
    Member since:
    Sep 2016

    Posted 16 Jan 2017 Link to this post

    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

  2. Nikolay Petrov
    Admin
    Nikolay Petrov avatar
    308 posts

    Posted 19 Jan 2017 Link to this post

    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
     
Back to Top