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

Silverlight - unnecessary Xaml path for clicks

3 Answers 43 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Dan
Top achievements
Rank 1
Dan asked on 19 Dec 2013, 05:46 PM
We just bought Test Studio, it seems great! I am currently going through our Silverlight application and adding automation ID's to all of our Telerik UI controls, since the full Xaml path seems volatile.

I noticed something I hope I don't have to manually edit every time-

I click on a textbox in our application, and type text into it.  2 elements are added to the repository, not 1.
Example:

  • LeftClick on Item4Textboxview
  • radwatermarktextbox: Type 'name' into rwtbLastNameRadwatermarkertextbox

I've attached two screenshots of the find logic for both elements.  Why does it want to also use the full Xaml path for the click? I'm happy I can remove that, and the extra element is removed from the element repository, but we have hundreds of UI controls.  I hope I don't have to edit every click element since the Xaml path changes sometimes. Is there a shortcut?

Thanks!
-Dan

3 Answers, 1 is accepted

Sort by
0
Dan
Top achievements
Rank 1
answered on 19 Dec 2013, 05:50 PM
I should add, I am starting with a fresh project and an empty element repository. Just hoping to do things right from the beginning.
0
Ivaylo
Telerik team
answered on 24 Dec 2013, 12:21 PM
Hello Dan,

I am afraid what you are experiencing is an expected behavior, you are performing the click on the parent element which is the textboxview and it gets added to the elements explorer, and when you start typing the textbox is added since this is a different element. You can always use the highlighting during the recording and add the desired element in the elements menu and perform the desired actions.
In silvelight is quite often for example when you click on a textblock element it gets active and becomes textbox element, where you can start typing, in such cases also two elements get added in the elements explorer.
Here is a sample video demonstration ( no audio ).

Regarding the xaml path, this is one of the attributes by which your element is found, you can always specify the priority of the attributes used in the find logic, please check this article for more details. You can also change how an element is found and remove the xaml path as shown here.

Regards,
Ivaylo
Telerik
The New Release of Telerik Test Studio Is Here! Download, install,
and send us your feedback!
0
Dan
Top achievements
Rank 1
answered on 27 Dec 2013, 01:46 PM
Thanks, I just wanted to make sure I wasn't wasting unnecessary time.  At least it is easy to remove each Xaml path if that's important to me.
Tags
General Discussions
Asked by
Dan
Top achievements
Rank 1
Answers by
Dan
Top achievements
Rank 1
Ivaylo
Telerik team
Share this question
or