Run Method

Applies to TestComplete 15.64, last modified on June 12, 2024


Launches the mobile browser emulator with the given browser profile (specified by the VirtualBrowserInfoObj object) and, optionally, opens a URL in the emulator.


VirtualBrowserInfoObj.Run(URL, PageLoadWaitTime)

VirtualBrowserInfoObj An expression, variable or parameter that specifies a reference to a VirtualBrowserInfo object
URL [in]    Optional    String Default value: Empty string   
PageLoadWaitTime [in]    Optional    Integer Default value: -1   
Result None

Applies To

The method is applied to the following object:


The method has the following parameters:


The URL of the web page to open in the mobile browser emulator. Add the protocol (for example, http:// or https://) at the beginning of the URL.

Tip: You can copy the full URL from the address bar of the web browser in which the needed page is open.

If omitted, the mobile browser emulator will open a blank page (about:blank).


The time, in milliseconds, to wait until the web page is loaded and ready to accept user input. The execution of the Run method finishes once the page is loaded completely or this timeout is reached.

If omitted or -1, the Run method uses the project’s Web page loading timeout.

Result Value



  • Google Chrome must not be running before the operation is run. If Chrome is running, the Run method opens a new tab in the running Chrome instance rather than starts the Chrome mobile emulator.

    Before calling the Run method, you can check if Chrome is running and close it if it is. To learn how to do this, see Check if Browser Is Running and Close Web Browsers.

  • After the mobile browser emulator is launched, the Aliases.browser object points to the browser emulator and provides access to the web pages that are open in it.

  • The Run method logs an event message if it succeeded and an error message if it failed.


The following script line opens the SmartBear mobile web site in the iPad browser emulator:

JavaScript, JScript

VirtualBrowsers.Item("Apple iPad").Run("");


VirtualBrowsers.Item["Apple iPad"].Run("");


Call VirtualBrowsers.Item("Apple iPad").Run("")


VirtualBrowsers.Item['Apple iPad'].Run('');

C++Script, C#Script

VirtualBrowsers["Item"]("Apple iPad")["Run"]("");

For more examples of the Run method usage, see the following topics:

See Also

Testing Mobile Web Applications Using Emulator
Launching Mobile Browser Emulator
VirtualBrowserInfo Object
Navigate Method
Run Virtual Browser Operation

Highlight search results