SetLab method

Supported in UFT versions 14.50 and higher.


Defines the test to use either the local desktop browser or an SRF environment browser.

For more details, see the Web Tab (Record and Run Settings Dialog Box) in the UFT Help Center.

Back to top


Name Values

One of the following:

LocalBrowser: Uses the local browser for the test.

SRFDesktopBrowser: Uses an SRF lab browser for the test.

Mobile settings

If you set the lab parameter value to SRFDesktopBrowser, be sure that the Mobile tab of the Record and Run Settings is not defined to use a Mobile Center browser.

This scenario is blocked by the UI but may occur when using the Automation Object Model.

To use a Mobile Center browser, use the MobileLauncher Object instead.

Property type

Read-write property

Back to top


Visual Basic

Public Function SetLab( _
ByVal Lab As String, _
) As WebLauncher

Back to top


SRF web testing code sample

Back to top

See also: