(828) 862-6667

Telerik Blogs



Creating a WebUI Test to navigate a Telerik RADMenu control

by Rich Winslow | Jul 21, 2010

I was surprised to find that simple attempts to write tests that included navigating via a Telerik RADMenu control produced an error that the menu item is hidden and not visible.

 

'7/21/2010 10:02:24 PM' - 'Fail' : 1. RadMenuItem('ctl00_HeaderMenu_ctl00_RadMenu1'): item 'Pricing' action -> 'Navigate' to '~/General/Pricing.aspx'
--------------------------------------------------
Failure Information:
~~~~~~~~~~~~~~~
Unable to locate element. Details: Attempting to find [Html] element using
Find logic
 (Html): [id 'Exact' ctl00_HeaderMenu_ctl00_RadMenu1][tagIndex 'Exact' li:6]

Unable to locate element. Search failed!

 

You can write WebUI Test Studio tests that successfully navigate through a RADMenu dropdown menu item, but it is not intuitively obvious... here's how:

  • Create a new WebAII test
  • Start Recording the test by clicking on the Record button
  • Navigate to the website of interest
  • In the browser, click on the root menu item at the top of the dropdown menu list you will be going after
  • In Visual Studio, select the last step, press F4 to get the properties window on the last step
  • In the properties window, modify the operation from 'Navigate' to 'Open'; this tells the test engine to open the dropdown list to make it visible
  • In the web browser, turn on the interactive mouse
  • Back in the web browser, hover over the root menu to open the dropdown list, hover over the RadMenu item and select click on the bubble closes to the item.

These 2 steps should open the dropdown list to make it visible and then to execute a click event to actually navigate to the desired page.

Comment

  1.    
     
     
      
       

Creating a WebUI Test to navigate a Telerik RADMenu control

by Rich Winslow | Jul 21, 2010

I was surprised to find that simple attempts to write tests that included navigating via a Telerik RADMenu control produced an error that the menu item is hidden and not visible.

 

'7/21/2010 10:02:24 PM' - 'Fail' : 1. RadMenuItem('ctl00_HeaderMenu_ctl00_RadMenu1'): item 'Pricing' action -> 'Navigate' to '~/General/Pricing.aspx'
--------------------------------------------------
Failure Information:
~~~~~~~~~~~~~~~
Unable to locate element. Details: Attempting to find [Html] element using
Find logic
 (Html): [id 'Exact' ctl00_HeaderMenu_ctl00_RadMenu1][tagIndex 'Exact' li:6]

Unable to locate element. Search failed!

 

You can write WebUI Test Studio tests that successfully navigate through a RADMenu dropdown menu item, but it is not intuitively obvious... here's how:

  • Create a new WebAII test
  • Start Recording the test by clicking on the Record button
  • Navigate to the website of interest
  • In the browser, click on the root menu item at the top of the dropdown menu list you will be going after
  • In Visual Studio, select the last step, press F4 to get the properties window on the last step
  • In the properties window, modify the operation from 'Navigate' to 'Open'; this tells the test engine to open the dropdown list to make it visible
  • In the web browser, turn on the interactive mouse
  • Back in the web browser, hover over the root menu to open the dropdown list, hover over the RadMenu item and select click on the bubble closes to the item.

These 2 steps should open the dropdown list to make it visible and then to execute a click event to actually navigate to the desired page.

Comment

  1.    
     
     
      
       















Company Info  |   Contact Us  |   Site Map  |   Terms  |   Privacy Policy  |  

Automated Results Computer Consulting LLC, 222 South Caldwell Street, Brevard, NC 28712 (828) 862-6667