Home Search Member List Faq Register Login  
UltimateMenu
How to force UltimateMenu to use my provided IDs for menu items and groups

Thread Starter: pivko4life   Started: 12-17-2012 11:28 AM   Replies: 1
 Karamasoft Support Forums » General Discussions » UltimateMenu » How to force UltimateMenu to use my provided IDs for menu items and groups
 Printable Version    « Previous Thread   Next Thread »
  17 Dec 2012, 11:28 AM
pivko4life is not online. Last active: 11/24/2013 9:38:19 PM pivko4life

Top 10 Posts
Joined on 10-10-2007
Posts 32
How to force UltimateMenu to use my provided IDs for menu items and groups

Hi.  I am building Coded UI tests to automate testing for our site which uses the latest Karamasoft ASP.NET UltimateMenu control.  In order to create a good automated test, I need to write some code to automatically traverse the menu by locating correct menu items based on their ID.   The problem that I have is that my IDs which I pass into the menu XML file, are not the actual IDs of the menu items generated in the HTML.  It will be much easier for me to write this automatic traversion mechanism if I could just locate the menu items by locating the IDs of the DOM elements, and then have my automated script to click or hover on the desired menu item.  My question is,  is there any way to pass the ID to the menu item so that it will be conserved in the resulting HTML of the table cell of the menu item.  Thanks in advance. 

P.S.   I succeeded in passing ID to  "ItemCssClass"  of the Item XML node, however, it overwrites the class attribute of the Table Cell element and I loose the CSS formatting so I need to find another way.     


  
  17 Dec 2012, 2:52 PM
Karamasoft is not online. Last active: 5/8/2018 10:36:45 AM Karamasoft

Top 10 Posts
Joined on 09-05-2004
Posts 6,820
Re: How to force UltimateMenu to use my provided IDs for menu items and groups
UltimateMenu doesn't use the ID attribute of the menu item element in XML file. It uses an algorithm that minimizes the HTML rendered instead, which generates IDs such as appending the group and item sequence numbers (e.g. for menu "um", it generates "umG1I1" for the first menu item in the first group). There is currently no way to pass the ID from the XML file to generate the same ID in the generated HTML.
  
 Page 1 of 1 (2 items)
Karamasoft Support Forums » General Discussions » UltimateMenu » How to force UltimateMenu to use my provided IDs for menu items and groups

You can add attachments
You can post new topics
You can reply to topics
You can delete your posts
You can edit your posts
You can create polls
You can vote in polls
Forum statistics are enabled
Forum is unmoderated

© 2002-2018 Karamasoft LLC. All rights reserved.