RadMenu and Telerik TestStudio

6 posts, 0 answers
  1. Oscar
    Oscar avatar
    21 posts
    Member since:
    Sep 2008

    Posted 27 Sep 2012 Link to this post

    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?

  2. Kate
    Admin
    Kate avatar
    1898 posts

    Posted 01 Oct 2012 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Oscar
    Oscar avatar
    21 posts
    Member since:
    Sep 2008

    Posted 12 Nov 2012 Link to this post

    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. 
  5. Kate
    Admin
    Kate avatar
    1898 posts

    Posted 15 Nov 2012 Link to this post

    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.
  6. Oscar
    Oscar avatar
    21 posts
    Member since:
    Sep 2008

    Posted 15 Nov 2012 Link to this post

    I was wondering if it was possible to change the name of the tooltip property on page load, ?
  7. Kate
    Admin
    Kate avatar
    1898 posts

    Posted 20 Nov 2012 Link to this post

    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.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017