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

RadMenu and Telerik TestStudio

5 Answers 57 Views
Menu
This is a migrated thread and some comments may be shown as answers.
Oscar
Top achievements
Rank 1
Oscar asked on 27 Sep 2012, 12:35 PM
Hello, I am having trouble automatizing testing of an app that uses RadMenu with TestStudio, The TestStudio guys suggested the following:

>The best practice for allowing efficient test maintenance is to use a unique ID for all automation targets. This prevents tests from failing >when elements move or are renamed. Test Studio uses IDs as the primary find logic by default, so new tests will automatically reflect this >identification strategy.

How can I assign a unique ID to each menu item and subitem?

5 Answers, 1 is accepted

Sort by
0
Kate
Telerik team
answered on 01 Oct 2012, 08:38 AM
Hello Oscar,

You can use a custom attributes or values that you can set to the different RadMenuItems. Below you can find a very useful help article that demonstrates how you can use custom attributes:
http://www.telerik.com/help/aspnet-ajax/menu-items-custom-attributes.html

Regards,
Kate
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Oscar
Top achievements
Rank 1
answered on 12 Nov 2012, 12:03 PM
Hello, the suggested solution does not work because custom attributes are not rendered as HTML markup and so they cannot be used by Telerik Test Studio (pls see this support ticket1 http://www.telerik.com/account/support-tickets/view-ticket.aspx?threadid=625045)
I found I could use the tooltip property to accomodate the testID, however, I do NOT want the tooltiptext to be visible by the user. Any other alternatives? 
I need to add some "invisible" HTML tag to each menu ítem to allow TestStudio to find it without localization or screen position issues. 
0
Kate
Telerik team
answered on 15 Nov 2012, 09:01 AM
Hello Oscar,

One possible approach that I could suggest you use, is to remove the tooltip on mouseover (so that it is not visible for the user) and apply it again on mouseout. Here you can find more information of the proposed approach as well as a simple example that you can extend further if needed.   

All the best,
Kate
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Oscar
Top achievements
Rank 1
answered on 15 Nov 2012, 06:11 PM
I was wondering if it was possible to change the name of the tooltip property on page load, ?
0
Kate
Telerik team
answered on 20 Nov 2012, 02:03 PM
Hi Oscar,

You can achieve that by finding the correct RadMenuItem or go through the items that you need and set their ToolTip property from code behind - you can find an example here

Kind regards,
Kate
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Menu
Asked by
Oscar
Top achievements
Rank 1
Answers by
Kate
Telerik team
Oscar
Top achievements
Rank 1
Share this question
or