Navigate
Web function.
The Navigate function causes the browser to open the specified url address.
Usage
Mainly used to go directly to a page instead of using the Web site navigation through its menus and links.
Syntax
Navigate(<url_address>[,<timeout>])
or
Ret=Navigate(<url_address>[,<timeout>])Parameters
<url_address>, string, url address to open.
<timeout>, numeric in seconds, optional parameter which specifies the maximum delay to wait for the page to be loaded.
If the optional parameter is not present, the #ActionTimeout system variable is used to specify the maximum wait for the page to be loaded.
Return value
Ret, numeric return code. When the navigation completes within the timeout period, the function returns the time it took for the page to be loaded in tenths of a second, otherwise use this return code for Error Handling. The return code is -1 if the browser has not been started (using StartBrowser function), or -5 if a navigation timeout occurs. If the IE browser object cannot "navigate" the specified address, the return code is -10. If Internet Explorer returns an error code (such as 404, 405), the return code is this Internet Explorer error code with the negative sign (-404, -405).
Remarks
Navigate is not generated automatically by Recording mode. Add this function in the script for navigating directly to an URL.
If a StartBrowser is done loading a blank page, the automatic synchronization on the page loaded cannot be done, so the Navigate function fails if an absolute Pause (Pause 2 secs for example) is not added between the StartBrowser line and the Navigate line. Under Vista, a StartBrowser with a blank page followed by a Navigate is rejected by IE if UAC is on. So we recommend to always use a StartBrowser to an url before using the Navigate function.
Example
StartBrowser("IE","www.wintask.com")
UsePage("WinTask - Automation software and Task Scheduler. Macro software with Macro Recorder")
Navigate("http://www.wintask.com/top10uses.php")