Bhavesh,
 
Did you find the solution to your problem?
To access the sub-menu use the hot key for the select tool in IE Dev Toolbar
When you have drilled down as far as you need to and/or want to go, hit 
CTRL+B (make sure your dev tool bar is open) this will bring up that blue 
box and let you select the item to find its applicable tags embedded in the 
HTML. 
Then as RJ is stating you will have to use "fire_event". What makes that 
sub-menu drill down is some type of event which is triggered with the 
cursor hovers over so it has to be simululated by firing that event during 
your script, or your script will likely fail because the event is being 
fired, so the simulated mouse is clicking on empty space.
 
Please let me know if that helped and/or if you have a question about it. I 
can try to help further.
 

On Wednesday, October 24, 2012 4:48:46 PM UTC-6, Bhavesh wrote:

> I have Menus in my applicaiton like "File", "View" etc.
>
> When i try clicking "View", it generates sub menus which inturns have some 
> suboptions.
>
> But im not able to click those sub options.
>
> Reason is, when i look into those submenu source code, it appears as :
>
>
> #################################
>
>
> <div id="MenuBar_view_menu_0html_id" class="menuBar" 
> onmouseout="rolloffMenu('MenuBar_view_menu_0')" 
> onmouseover="rolloverMenu('MenuBar_view_menu_0')" 
> onclick="popupMenu('MenuBar_view_menu_0')" style="height: 18px; width: 
> 50px; cursor: pointer; text-align: center;" name="MenuBar_view_menu_0">
> View
> <div style="position: relative; left: -25px; top: 0pt; width: 0pt; height: 
> 0pt;">
> <img id="MenuBar_view_menu_0_anchor" height="0" width="0" alt="" 
> src="/da/wdk/theme/documentum/images/space.gif">
> </div>
> </div>
> <script>
>
> 1createMenu('MenuBar_view_menu_0','MenuBar_menugroup_0','false','MenuBar_view_menu_0html_id');
> 2
>
> 3addSubMenu('MenuBar_view_properties_menu_0','MenuBar_view_menu_0','Properties',null);
> 4
>
> 5registerActionControl('__client10_MenuBar_view_info_0','attributes',null,true,false,1,true,'');addMenuItem('__client10_MenuBar_view_info_0','MenuBar_view_properties_menu_0','Info',null,'fireDynamicActionEvent("__client10_MenuBar_view_info_0")',true,true,'P');
> </script>
> <script type="text/javascript">
> 1registerHotKeyHandler('P', 
> 'fireDynamicActionEvent("__client10_MenuBar_view_info_0")', 
> '__client10_MenuBar_view_info_0');
> </script>
> <script type="text/javascript">
> 1
>
> 2registerActionControl('__client10_MenuBar_view_mbeanresourceattributes_0','mbeanresourceattributes',null,true,false,1,true,'');addMenuItem('__client10_MenuBar_view_mbeanresourceattributes_0','MenuBar_view_properties_menu_0','Attributes',null,'fireDynamicActionEvent("__client10_MenuBar_view_mbeanresourceattributes_0")',true,true,'');
> </script>
>
> ###############################
>
> So all subme nu is appearing as registerActionControl, which is i think 
> some java script that gets invoked.
>
> Do anyone know how to operate using watir on these controls?
>
> thanks
> Bhavesh
>

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

[email protected]
http://groups.google.com/group/watir-general
[email protected]

Reply via email to