StartBrowser
Web function.
The StartBrowser function launches the specified browser (Internet Explorer version 6 or above is needed). StartBrowser is not supported under NT and you must use instead the Shell statement in order to launch Internet Explorer.
Usage
It loads the Web page and waits until the page is finished loading. If a Security window prevents the page to finish loading, use Shell function instead of StartBrowser. If you prefer to use another browser than IE, use Shell function to run it, but you will have to insert a manual synchronization to wait until the page is finished loading.
Syntax
StartBrowser(<browser_type>[,<start_page>[,<param>]])
or
Ret=StartBrowser(<browser_type>[,<start_page>[,<param>]])Parameters
<browser_type>, string, only the string "IE" for Internet Explorer version 6 or above is accepted.
<start_page>, string, optional parameter specifying the start page. If this parameter is not specified, the default start page for the browser is used.
<param> : 1 for normal execution of Internet Explorer, 2 for minimized execution of Internet Explorer, 3 for maximized execution of Internet Explorer.
Note that a Startbrowser("IE") function is generated each time you start Recording after launching a program if you click Internet Explorer as the application to launch (see Recording mode). If, during execution, a second StartBrowser is found in the script, a second instance of the browser will be opened.
Return value
Ret, numeric return code. When the browser has been started correctly and the page could be loaded within 30 seconds (this default value can be changed using #ActionTimeout), the function returns 0. Otherwise use this return code for Error Handling. The return code is -3 if <browser_type> is incorrect. The return code is -2146697211 if an HTTP error prevents the specified page to load.
Remarks
If at replay, StartBrowser returns a Page timeout error message, see Page timeout error message topic.
If you want to retry to load the url for a couple of times if StartBrowser fails, such a script is listed in Advanced_Script_Examples sub-directory of WinTask (script name is Start browser and retry the url if unsuccessfull).
Example
StartBrowser("IE","www.wintask.com")