WPF recording not using x:Uid for element determination?

5 posts, 0 answers
  1. Geert
    Geert avatar
    9 posts
    Member since:
    May 2011

    Posted 26 Jun 2015 Link to this post

    When first trying the software on a WPF app, it was using the [TextBlockValue]TextBlock for the names. Since the value of the text block can change (and we need to check whether the name is valid), I added x:Uid to all elements we want to test.

    However, it looks like test studio is still preferring [TextBlockValue]TextBlock instead of the x:Uid to search for the element. Is there any way we can force Test Studio to look at the x:Uid instead?

    Thanks!

  2. Ivaylo
    Admin
    Ivaylo avatar
    750 posts

    Posted 01 Jul 2015 Link to this post

    Hello,

    You should be able to change the find logic of the element as shown in this article.

    If you still experiencing any difficulties please provide your WPF application and a sample project/test so we can review the behavior.

    Regards,
    Ivaylo
    Telerik
     
    The New Release of Telerik Test Studio Is Here! Download, install,
    and send us your feedback!
  3. Geert
    Geert avatar
    9 posts
    Member since:
    May 2011

    Posted 03 Jul 2015 in reply to Ivaylo Link to this post

    Thanks for the reply. When inspecting the properties, this is what I see in the properties window of a button with a Uid:

    <Button Uid='17668543'>

    In code the button is defined as:

    <Button x:Uid="fixItButton">

     Is this a "feature" of WPF or Test Studio?

  4. Geert
    Geert avatar
    9 posts
    Member since:
    May 2011

    Posted 03 Jul 2015 in reply to Geert Link to this post

    When checking out the xaml via .NET reflector, it looks good (it can see that the x:Uid is fixItButton.
  5. Ivaylo
    Admin
    Ivaylo avatar
    750 posts

    Posted 08 Jul 2015 Link to this post

    Hello Geert,

    We will need the application or a sample that represents the problem. I couldn't reproduce this with an wpf application on my end.

    Regards,
    Ivaylo
    Telerik
     
    The New Release of Telerik Test Studio Is Here! Download, install,
    and send us your feedback!
Back to Top