| View previous topic :: View next topic |
| Author |
Message |
Tyrsius
Joined: 09 Jul 2009 Posts: 140
|
Posted: Tue Mar 16, 2010 10:57 pm Post subject: Unknown Element: UltraWebMenu |
|
|
I am in the middle of writing some Javascript automation for a site. Everything else on the site has a standard DOM address, and is easily automated through COM (thanks Sean!). There is one item that DOM inspectors show as an UltraWebMenu, and everything in the menu lacks a formId.
Is anyone familiar with this? Can it be automated through COM?
| Code: |
; This is the top level node
form id="form1"
div id="raMenu"
table id="igUltraWebMenu_MainM" class="igmnMenuGroup"
tbody
tr
td
table id="igUltraWebMenu_3" class="igmnTopMenuItem
;this is the subitem I want to click on
div id="igUltraWebMenu_3_3M" class=" igmnMenuGroup"
div
table class=" igmnMenuGroup"
tbody
tr
td
table id="igUltraWebMenu_3_3_2" class="igmnMenuItem"
|
|
|
| Back to top |
|
 |
answer4u Guest
|
Posted: Tue Mar 16, 2010 11:04 pm Post subject: |
|
|
Do you have a link, or the full HTML? I would assume something like: | Code: | | javascript: document.all['igUltraWebMenu_3_3M'].click() |
|
|
| Back to top |
|
 |
Tyrsius
Joined: 09 Jul 2009 Posts: 140
|
Posted: Tue Mar 16, 2010 11:53 pm Post subject: |
|
|
The page requires a login, and I would not be able to provide credentials to the community here. I would not feel posting the html would be a good idea either.
Sorry, I know that doesn't help much.
I tried that code, it did not work. |
|
| Back to top |
|
 |
Tyrsius
Joined: 09 Jul 2009 Posts: 140
|
Posted: Wed Mar 17, 2010 8:41 pm Post subject: |
|
|
I think this is as good as I will be able to do.
This is the source code containing the element.
| Code: |
<div id="abs_igUltraWebMenu" style="display:none"> <div container='1' style='overflow:hidden;position:absolute;visibility:hidden;display:none;z-index:12000;'> <div submenu='1'id='igUltraWebMenu_1M' class=" igmnMenuGroup" style='position:relative;'igLevel='1'> <div scrollDiv=1><table border='0' cellpadding='1' cellspacing='0' class=" igmnMenuGroup" style='border-width:0;'> <tr igitem='1'><td><table width='100%' cellpadding='1' cellspacing='0' id='igUltraWebMenu_1_1' igTag='print' ighovimage='/images/buttons/Print.gif' igHov='igmnMenuItemHover'igUrl="JavaScript:print();" class="igmnMenuItem ig_c5d31239_r2"> <tr><td width='25px' ><img src='/images/buttons/Print.gif'></td><td igtxt='1'> <nobr>Print</nobr> </td><td width="15"></td></tr></table></td></tr> <tr igitem='1'><td><table width='100%' cellpadding='1' cellspacing='0' id='igUltraWebMenu_1_2' igTag='export' igDisabled='1' ighovimage='/images/buttons/Export_disabled.gif' igHov='igmnMenuItemHover' igDisabled='1' class="igmnDisabledMenuItem"> <tr><td width='25px' ><img src='/images/buttons/Export_disabled.gif'></td><td igtxt='1'> <nobr>Export</nobr> </td><td width="15"></td></tr></table></td></tr> </table></div></div></div> <div container='1' style='overflow:hidden;position:absolute;visibility:hidden;display:none;z-index:12000;'> <div submenu='1'id='igUltraWebMenu_2M' class=" igmnMenuGroup" style='position:relative;'igLevel='1'> <div scrollDiv=1><table border='0' cellpadding='1' cellspacing='0' class=" igmnMenuGroup" style='border-width:0;'> <tr igitem='1'><td><table width='100%' cellpadding='1' cellspacing='0' id='igUltraWebMenu_2_1' igTag='report' igDisabled='1' ighovimage='/images/buttons/Report_disabled.gif' igHov='igmnMenuItemHover'igUrl="JavaScript:menuItemClicked();" igDisabled='1' class="igmnDisabledMenuItem"> <tr><td width='25px' ><img src='/images/buttons/Report_disabled.gif'></td><td igtxt='1'> <nobr>Report</nobr> </td><td width="15"></td></tr></table></td></tr> <tr igitem='1'><td><table width='100%' cellpadding='1' cellspacing='0' id='igUltraWebMenu_2_2' igTag='graph' igDisabled='1' ighovimage='/images/buttons/Graph_disabled.gif' igHov='igmnMenuItemHover'igUrl="JavaScript:menuItemClicked();" igDisabled='1' class="igmnDisabledMenuItem"> <tr><td width='25px' ><img src='/images/buttons/Graph_disabled.gif'></td><td igtxt='1'> <nobr>Graph</nobr> </td><td width="15"></td></tr></table></td></tr> </table></div></div></div> <div container='1' style='overflow:hidden;position:absolute;visibility:hidden;display:none;z-index:12000;'> <div submenu='1'id='igUltraWebMenu_3M' class=" igmnMenuGroup" style='position:relative;'igLevel='1'> <div scrollDiv=1><table border='0' cellpadding='1' cellspacing='0' class=" igmnMenuGroup" style='border-width:0;'> <tr igitem='1'><td><table width='100%' cellpadding='1' cellspacing='0' id='igUltraWebMenu_3_1' igTag='transfer' igHov='igmnMenuItemHover' igChildId='igUltraWebMenu_3_1M'igUrl="JavaScript:menuItemClicked();" class="igmnMenuItem"> <tr><td width='25px' ></td><td igtxt='1'> <nobr>Transfer</nobr> </td><td width="15"><img align="right" src="/RS/RSRACS/WebResource.axd?d=EGtcRqcG9_TMglwFnZqcriW2FGYp8uvxJ7XqTvZ8CvrKR2DrnlMtWP4AmPU3k4qalBk3nqvOmEPPYJvkYg63Q_0q8YSuplNrjDJtH6bf16hf2zE3xmMGRfZapHe2FKJzeasyqUHhJI5n7ceBChOAunlKKhCNBSyvb9gfDyygcAt-C3c7226TCYa1ADdl98vk0&t=633289117043928982"> </td></tr></table></td></tr> <tr igitem='1'><td><table width='100%' cellpadding='1' cellspacing='0' id='igUltraWebMenu_3_2' igTag='email' igHov='igmnMenuItemHover' igChildId='igUltraWebMenu_3_2M'igUrl="JavaScript:menuItemClicked();" class="igmnMenuItem"> <tr><td width='25px' ></td><td igtxt='1'> <nobr>Email</nobr> </td><td width="15"><img align="right" src="/RS/RSRACS/WebResource.axd?d=EGtcRqcG9_TMglwFnZqcriW2FGYp8uvxJ7XqTvZ8CvrKR2DrnlMtWP4AmPU3k4qalBk3nqvOmEPPYJvkYg63Q_0q8YSuplNrjDJtH6bf16hf2zE3xmMGRfZapHe2FKJzeasyqUHhJI5n7ceBChOAunlKKhCNBSyvb9gfDyygcAt-C3c7226TCYa1ADdl98vk0&t=633289117043928982"> </td></tr></table></td></tr> <tr igitem='1'><td><table width='100%' cellpadding='1' cellspacing='0' id='igUltraWebMenu_3_3' igTag='return' igHov='igmnMenuItemHover' igChildId='igUltraWebMenu_3_3M'igUrl="JavaScript:menuItemClicked();" class="igmnMenuItem"> <tr><td width='25px' ></td><td igtxt='1'> <nobr>Return to Dispatch</nobr> </td><td width="15"><img align="right" src="/RS/RSRACS/WebResource.axd?d=EGtcRqcG9_TMglwFnZqcriW2FGYp8uvxJ7XqTvZ8CvrKR2DrnlMtWP4AmPU3k4qalBk3nqvOmEPPYJvkYg63Q_0q8YSuplNrjDJtH6bf16hf2zE3xmMGRfZapHe2FKJzeasyqUHhJI5n7ceBChOAunlKKhCNBSyvb9gfDyygcAt-C3c7226TCYa1ADdl98vk0&t=633289117043928982"> </td></tr></table></td></tr> </table></div></div></div> <div container='1' style='overflow:hidden;position:absolute;visibility:hidden;display:none;z-index:12000;'> <div submenu='1'id='igUltraWebMenu_3_1M' class=" igmnMenuGroup" style='position:relative;'> <div scrollDiv=1><table border='0' cellpadding='1' cellspacing='0' class=" igmnMenuGroup" style='border-width:0;'> <tr igitem='1'><td><table width='100%' cellpadding='1' cellspacing='0' id='igUltraWebMenu_3_1_1' igTag='ACCDIS' igHov='igmnMenuItemHover'igUrl="JavaScript:menuItemClicked();" class="igmnMenuItem"> <tr><td width='25px' ></td><td igtxt='1'> <nobr>ACCOUNTING (AC)</nobr> </td><td width="15"></td></tr></table></td></tr> <tr igitem='1'><td><table width='100%' cellpadding='1' cellspacing='0' id='igUltraWebMenu_3_1_2' igTag='CATDIS' igHov='igmnMenuItemHover'igUrl="JavaScript:menuItemClicked();" class="igmnMenuItem"> <tr><td width='25px' ></td><td igtxt='1'> <nobr>CATEGORY MANAGEMENT (CM)</nobr> </td><td width="15"></td></tr></table></td></tr> <tr igitem='1'><td><table width='100%' cellpadding='1' cellspacing='0' id='igUltraWebMenu_3_1_3' igTag='DPODIS' igHov='igmnMenuItemHover'igUrl="JavaScript:menuItemClicked();" class="igmnMenuItem"> <tr><td width='25px' ></td><td igtxt='1'> <nobr>DEPOT (DP)</nobr> </td><td width="15"></td></tr></table></td></tr> <tr igitem='1'><td><table width='100%' cellpadding='1' cellspacing='0' id='igUltraWebMenu_3_1_4' igTag='OPRDIS' igHov='igmnMenuItemHover'igUrl="JavaScript:menuItemClicked();" class="igmnMenuItem"> <tr><td width='25px' ></td><td igtxt='1'> <nobr>OPERATIONAL (OP)</nobr> </td><td width="15"></td></tr></table></td></tr> <tr igitem='1'><td><table width='100%' cellpadding='1' cellspacing='0' id='igUltraWebMenu_3_1_5' igTag='STODIS' igHov='igmnMenuItemHover'igUrl="JavaScript:menuItemClicked();" class="igmnMenuItem"> <tr><td width='25px' ></td><td igtxt='1'> <nobr>STORE OPERATIONS (SO)</nobr> </td><td width="15"></td></tr></table></td></tr> <tr igitem='1'><td><table width='100%' cellpadding='1' cellspacing='0' id='igUltraWebMenu_3_1_6' igTag='TPSDIS' igHov='igmnMenuItemHover'igUrl="JavaScript:menuItemClicked();" class="igmnMenuItem"> <tr><td width='25px' ></td><td igtxt='1'> <nobr>THIRD PARTY OPERATOR (TP)</nobr> </td><td width="15"></td></tr></table></td></tr> <tr igitem='1'><td><table width='100%' cellpadding='1' cellspacing='0' id='igUltraWebMenu_3_1_7' igTag='DISD10' igHov='igmnMenuItemHover'igUrl="JavaScript:menuItemClicked();" class="igmnMenuItem"> <tr><td width='25px' ></td><td igtxt='1'> <nobr>DISTRIBUTION (10)</nobr> </td><td width="15"></td></tr></table></td></tr> </table></div></div></div> <div container='1' style='overflow:hidden;position:absolute;visibility:hidden;display:none;z-index:12000;'> <div submenu='1'id='igUltraWebMenu_3_2M' class=" igmnMenuGroup" style='position:relative;'> <div scrollDiv=1><table border='0' cellpadding='1' cellspacing='0' class=" igmnMenuGroup" style='border-width:0;'> <tr igitem='1'><td><table width='100%' cellpadding='1' cellspacing='0' id='igUltraWebMenu_3_2_1' igTag='reminder' igHov='igmnMenuItemHover'igUrl="JavaScript:showDatePage('DateReminder.aspx');" class="igmnMenuItem"> <tr><td width='25px' ></td><td igtxt='1'> <nobr>Set Reminder</nobr> </td><td width="15"></td></tr></table></td></tr> <tr igitem='1'><td><table width='100%' cellpadding='1' cellspacing='0' id='igUltraWebMenu_3_2_2' igTag='internal' igHov='igmnMenuItemHover'igUrl="JavaScript:mailInternal();" class="igmnMenuItem"> <tr><td width='25px' ></td><td igtxt='1'> <nobr>RA Internal</nobr> </td><td width="15"></td></tr></table></td></tr> <tr igitem='1'><td><table width='100%' cellpadding='1' cellspacing='0' id='igUltraWebMenu_3_2_3' igTag='service' igHov='igmnMenuItemHover' class="igmnMenuItem"> <tr><td width='25px' ></td><td igtxt='1'> <nobr>Service Provider</nobr> </td><td width="15"></td></tr></table></td></tr> </table></div></div></div> <div container='1' style='overflow:hidden;position:absolute;visibility:hidden;display:none;z-index:12000;'> <div submenu='1'id='igUltraWebMenu_3_3M' class=" igmnMenuGroup" style='position:relative;'> <div scrollDiv=1><table border='0' cellpadding='1' cellspacing='0' class=" igmnMenuGroup" style='border-width:0;'> <tr igitem='1'><td><table width='100%' cellpadding='1' cellspacing='0' id='igUltraWebMenu_3_3_1' igTag='CM' igHov='igmnMenuItemHover' class="igmnMenuItem"> <tr><td width='25px' ></td><td igtxt='1'> <nobr>CATDIS</nobr> </td><td width="15"></td></tr></table></td></tr> <tr igitem='1'><td><table width='100%' cellpadding='1' cellspacing='0' id='igUltraWebMenu_3_3_2' igTag='FT' igHov='igmnMenuItemHover' class="igmnMenuItem"> <tr><td width='25px' ></td><td igtxt='1'> <nobr>FTSDIS</nobr> </td><td width="15"></td></tr></table></td></tr> <tr igitem='1'><td><table width='100%' cellpadding='1' cellspacing='0' id='igUltraWebMenu_3_3_3' igTag='OP' igHov='igmnMenuItemHover' class="igmnMenuItem"> <tr><td width='25px' ></td><td igtxt='1'> <nobr>OPRDIS</nobr> </td><td width="15"></td></tr></table></td></tr> <tr igitem='1'><td><table width='100%' cellpadding='1' cellspacing='0' id='igUltraWebMenu_3_3_4' igTag='SC' igHov='igmnMenuItemHover' class="igmnMenuItem"> <tr><td width='25px' ></td><td igtxt='1'> <nobr>SUPDIS</nobr> </td><td width="15"></td></tr></table></td></tr> <tr igitem='1'><td><table width='100%' cellpadding='1' cellspacing='0' id='igUltraWebMenu_3_3_5' igTag='SO' igHov='igmnMenuItemHover' class="igmnMenuItem"> <tr><td width='25px' ></td><td igtxt='1'> <nobr>STODIS</nobr> </td><td width="15"></td></tr></table></td></tr> <tr igitem='1'><td><table width='100%' cellpadding='1' cellspacing='0' id='igUltraWebMenu_3_3_6' igTag='10' igHov='igmnMenuItemHover' class="igmnMenuItem"> <tr><td width='25px' ></td><td igtxt='1'> <nobr>DISD10</nobr> </td><td width="15"></td></tr></table></td></tr> </table></div></div></div> <div container='1' style='overflow:hidden;position:absolute;visibility:hidden;display:none;z-index:12000;'> <div submenu='1'id='igUltraWebMenu_4M' class=" igmnMenuGroup" style='position:relative;'igLevel='1'> <div scrollDiv=1><table border='0' cellpadding='1' cellspacing='0' class=" igmnMenuGroup" style='border-width:0;'> <tr igitem='1'><td><table width='100%' cellpadding='1' cellspacing='0' id='igUltraWebMenu_4_1' igTag='help' ighovimage='/images/buttons/help.gif' igHov='igmnMenuItemHover'igUrl="JavaScript:showHelpPage('Help.htm');" class="igmnMenuItem ig_c5d31239_r2"> <tr><td width='25px' ><img src='/images/buttons/help.gif'></td><td igtxt='1'> <nobr>Help</nobr> </td><td width="15"></td></tr></table></td></tr> <tr igitem='1'><td><table width='100%' cellpadding='1' cellspacing='0' id='igUltraWebMenu_4_2' igTag='getstarted' igDisabled='1' igHov='igmnMenuItemHover'igUrl="JavaScript:showHelpPage('GetStarted.htm');" igDisabled='1' class="igmnDisabledMenuItem"> <tr><td width='25px' ></td><td igtxt='1'> <nobr>Getting Started</nobr> </td><td width="15"></td></tr></table></td></tr> <tr igitem='1'><td><table width='100%' igSep='1' id='igUltraWebMenu_4_3'><tr><td class='igmnMenuBreak'></td></tr></table></td></tr><tr igitem='1'><td><table width='100%' cellpadding='1' cellspacing='0' id='igUltraWebMenu_4_4' igTag='about' igHov='igmnMenuItemHover'igUrl="JavaScript:showAboutPage('HelpAbout.htm');" class="igmnMenuItem ig_c5d31239_r2"> <tr><td width='25px' ></td><td igtxt='1'> <nobr>About RSRACS</nobr> </td><td width="15"></td></tr></table></td></tr> </table></div></div></div> </div>
|
Here is what it looks like (sensitive information redacted), as well as some images of what different inspection tools display when hovering over it. As you can see, most of the normal information is missing. The id shown in the AHK tool is not reliable, it changes depending on other content on the page.
Note, the menu is hover based (sub-menus expand when you hover over their parent), and only bottom level items respond to clicks.
 |
|
| Back to top |
|
 |
answer4u Guest
|
Posted: Wed Mar 17, 2010 8:58 pm Post subject: |
|
|
| It might just be my computer, but if I save that to an html file & open it, I get a blank webpage. |
|
| Back to top |
|
 |
Tyrsius
Joined: 09 Jul 2009 Posts: 140
|
Posted: Wed Mar 17, 2010 9:29 pm Post subject: |
|
|
| It is probably very tied into the rest of the page. |
|
| Back to top |
|
 |
tank
Joined: 21 Dec 2007 Posts: 3700 Location: Louisville KY USA
|
Posted: Wed Mar 17, 2010 9:33 pm Post subject: |
|
|
| Code: | | javascript: document.all[226].click() | try cklicking the index _________________
We are troubled on every side‚ yet not distressed; we are perplexed‚
but not in despair; Persecuted‚ but not forsaken; cast down‚ but not destroyed; |
|
| Back to top |
|
 |
Tyrsius
Joined: 09 Jul 2009 Posts: 140
|
Posted: Wed Mar 17, 2010 11:13 pm Post subject: |
|
|
The index number is not reliable. It changes based on dynamic page contents. Though always inbetween 224-229, its usually never the same twice.
I did try after getting the index though, and it did not work. If I try the click command through com, it says the element is hidden or does not accept that command. |
|
| Back to top |
|
 |
tank
Joined: 21 Dec 2007 Posts: 3700 Location: Louisville KY USA
|
Posted: Thu Mar 18, 2010 1:02 am Post subject: |
|
|
you could see if the index of the NOBR tagis consistent
document.all.tags[NOBR].item[somenumber].click
you may need to be creative is there consistant text thats unique within it or directly adjacent etc? _________________
We are troubled on every side‚ yet not distressed; we are perplexed‚
but not in despair; Persecuted‚ but not forsaken; cast down‚ but not destroyed; |
|
| Back to top |
|
 |
Tyrsius
Joined: 09 Jul 2009 Posts: 140
|
Posted: Thu Mar 18, 2010 1:15 am Post subject: |
|
|
According to the Source the NOBR tag for that item is FTSDIS. Though I do not know what an NOBR tag is.
I tried that command as the following, but to no effect. I am probably not entering it correctly.
document.all.tags[FTSDIS].item[0].click
document.all.tags[FTSDIS].item[1].click
document.all.tags['FTSDIS'].item[0].click
document.all.tags['FTSDIS'].item[1].click
I am not sure what the item number is referring to, or where to get it. This is the section I found the NOBR tag, and it has an igitem, if that helps you at all.
| Code: |
<tr igitem='1'><td><table width='100%' cellpadding='1' cellspacing='0' id='igUltraWebMenu_3_3_2' igTag='FT' igHov='igmnMenuItemHover' class="igmnMenuItem"> <tr><td width='25px' ></td><td igtxt='1'> <nobr>FTSDIS</nobr> </td><td width="15"></td></tr></table></td></tr>
|
|
|
| Back to top |
|
 |
Tyrsius
Joined: 09 Jul 2009 Posts: 140
|
Posted: Thu Mar 18, 2010 1:30 am Post subject: |
|
|
javascript: alert(document.all['igUltraWebMenu_3_3_2'].id)
Does get it to display the proper ID, but will still not let me click on it. This seems like its because it is hidden.
It is possible to use the keyboard to navigate the menu, once you have hoevered over one of the nodes, and the use {space} to select the item. Is it possible a submit command could work on hidden or non-visisble items? |
|
| Back to top |
|
 |
tank
Joined: 21 Dec 2007 Posts: 3700 Location: Louisville KY USA
|
Posted: Thu Mar 18, 2010 1:53 am Post subject: |
|
|
nobr is the tag
FTSDIS is the text
your clicks wont work unless you use the tag name
the item number is a 0 based index of the tag your using
note things like <nobr> are a tag and nobr is the tagname _________________
We are troubled on every side‚ yet not distressed; we are perplexed‚
but not in despair; Persecuted‚ but not forsaken; cast down‚ but not destroyed; |
|
| Back to top |
|
 |
Tyrsius
Joined: 09 Jul 2009 Posts: 140
|
Posted: Thu Mar 18, 2010 2:45 am Post subject: |
|
|
document.all.tags[NOBR].item[1].click
...
document.all.tags[NOBR].item[100]click
Produces no result. Is there a way to pull the nobr index of an element? |
|
| Back to top |
|
 |
Tyrsius
Joined: 09 Jul 2009 Posts: 140
|
Posted: Thu Mar 18, 2010 3:23 am Post subject: |
|
|
I've gone through all the functions, this section of the menu doesn't seem to be tied to anything that I can tell. I think I'm too burned out to continue today. I will stop back tomorrow.
If anyone out there is up to this crazy task, here is the full source from the page. The item I am trying to select is igUltraWebMenu_3_3_2.
The source breaks the code tags, you can download it here. |
|
| Back to top |
|
 |
answer4u Guest
|
Posted: Thu Mar 18, 2010 4:32 am Post subject: |
|
|
| Tyrsius wrote: | | The item I am trying to select is igUltraWebMenu_3_3_2 | Are you sure? Based on MODIv2 it looks like that element is in the parent structure. Try perhaps: | Code: | | javascript: document.all['igUltraWebMenu_3_3_2'].getElementsByTagName('nobr')[#].click() | Try different numbers for # - starting at 0. If that doesn't work, I would try using the childNode() method to step down from the igUltraWebMenu_3_3_2 element. |
|
| Back to top |
|
 |
|