Launches the corresponding browser, and, if a URL was specified as a parameter, navigates to the web page.
|BrowserInfoObj||An expression, variable or parameter that specifies a reference to a BrowserInfo object|
|URL||[in]||Optional||String||Default value: Empty string|
|PageLoadWaitTime||[in]||Optional||Integer||Default value: -1|
The method is applied to the following object:
The method has the following parameters:
The URL of the web page to be opened after the browser starts.
We recommend that you specify the complete URL of the desired page, including the protocol name, page extension, trailing slash and so on. For instance, https://developer.mozilla.org/en-US/. You can copy the complete URL from the browser’s address bar.
The time (in milliseconds) to wait until the browser loads the page and becomes ready to accept user input. If PageLoadWaitTime is omitted, the timeout is specified by the project’s Web page loading timeout option. After the specified time limit is reached, the test execution proceeds.
To improve the Firefox performance, the method automatically configures some Firefox settings before launching the web browser.
These settings will not be restored to their initial values after the test run is over.
To prevent TestComplete from modifying your Firefox settings, do not use the
Run method (and the BrowserInfo.Navigate method) in your test. As a workaround, you can launch Firefox by using the
TestedApp.Run method and navigate to web pages by simulating user actions on the browser's address bar.
If the method navigates to a web page successfully, it posts an event message to the test log.
If the method cannot navigate to a web page, it fails and posts an error message to the test log.
If the specified browser is already running in the system, the method posts a warning message to the test log. For information on how to determine whether a browser is running, see Checking if Browser Is Running.
If your tests install or uninstall browsers during the run, then you need to update the browser collection before continuing the test. To do this, call the
Browsers.Refresh method before launching a browser, navigating to a web page or performing any other browser-related operation after the installation or uninstallation is over.
The following code demonstrates how to launch Internet Explorer and open the Products page of the SmartBear web site:
def RunIE(): Browsers.Item[btIExplorer].Run("http://smartbear.com/products");
For more examples of using this method, see the following topics: