StartBrowser
Web function.
The StartBrowser function launches the specified browser (Internet Explorer and Firefox are supported).
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 (see Page Timeout Error topic).
Syntax
StartBrowser(<browser_type>[,<start_page>[,<param>]])
or
Ret=StartBrowser(<browser_type>[,<start_page>[,<param>]])Parameters
<browser_type>, string. The possible values are "IE" for launching Internet Explorer, and "FF" for launching Firefox.
<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 the browser, 2 for minimized execution of the browser, 3 for maximized execution of the browser.
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).
Examples
StartBrowser("IE","www.wintask.com",3)
StartBrowser("FF","www.wintask.com/demos/index.htm",3)