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.

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).