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

WPF recording not using x:Uid for element determination?

4 Answers 299 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Geert
Top achievements
Rank 1
Geert asked on 26 Jun 2015, 12:10 PM

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!

4 Answers, 1 is accepted

Sort by
0
Ivaylo
Telerik team
answered on 01 Jul 2015, 07:44 AM
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!
0
Geert
Top achievements
Rank 1
answered on 03 Jul 2015, 11:38 AM

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?

0
Geert
Top achievements
Rank 1
answered on 03 Jul 2015, 11:41 AM
When checking out the xaml via .NET reflector, it looks good (it can see that the x:Uid is fixItButton.
0
Ivaylo
Telerik team
answered on 08 Jul 2015, 05:50 AM
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!
Tags
General Discussions
Asked by
Geert
Top achievements
Rank 1
Answers by
Ivaylo
Telerik team
Geert
Top achievements
Rank 1
Share this question
or