Recording Web Page Hover Menus
Many web pages use Hover Menus to provide the same functionality as the menu bar of a typical Windows application. The user positions the mouse over a hover menu for a short period of time and a drop-down menu appears with additional menu items. The user can then click on one of the items to perform some action. On rare occasions, a web page contains a hover menu that is nested two or more levels deep.
Recording the selection of a hover menu item requires slightly more effort on the user's part during than clicking a link to another page. Follow the steps below during Recording mode.
Position the mouse cursor over the desired hover menu item.
Press the Shift key once while the menu item is highlighted.
After the drop-down menu opens, position the mouse cursor over the desired menu item on the drop-down menu item.
Press the Shift key once while the drop-down menu item is highlighted.
Repeat the last two steps as needed if the web page hover menu is deeper than one level.
Click the desired menu item.
The above steps will generate code similar to the following script.
StartBrowser("IE","www.wintask.com")
UsePage("Macro and Data Extraction with WinTask - the automation software for Windows and internet")OverHTMLElement("A[INNERTEXT= 'Overview']")
ClickHTMLElement("A[INNERTEXT= 'Features']")
When the script is executed, the first OverHTMLElement statement positions the mouse cursor over the top level menu item, Overview, which opens a drop-down menu. The Features menu item is clicked using the ClickHTMLElement statement.
If Recording mode has generated several identical OverHTMLELement lines, you can delete them and keep only one (Recording mode can generate several identical lines if the Shift key is pressed more than just once).