Class SrfLab
This class can be used to launch browsers or lock devices in the SRF lab.
Inherited Members
Namespace: HP.LFT.SDK
Assembly: HP.LFT.SDK.dll
Syntax
public class SrfLab
Constructors
SrfLab()
Declaration
public SrfLab()
Methods
LaunchBrowser(BrowserDescription)
Launches a new browser tab returning an instance of IBrowser for the launched browser.
Declaration
public static IBrowser LaunchBrowser(BrowserDescription description)
Parameters
| Type | Name | Description |
|---|---|---|
| BrowserDescription | description | the description of the browser to launch. |
Returns
| Type | Description |
|---|---|
| IBrowser | The IBrowser for the launched browser |
Remarks
The returned browser instance is valid until the tab is closed.
LaunchBrowser(BrowserType)
Launches a new browser tab returning an instance of IBrowser for the launched browser.
Declaration
public static IBrowser LaunchBrowser(BrowserType browserType)
Parameters
| Type | Name | Description |
|---|---|---|
| BrowserType | browserType | Type of browser to launch: Possible values: BrowserType |
Returns
| Type | Description |
|---|---|
| IBrowser | The IBrowser for the launched browser |
Remarks
The returned browser instance is valid until the tab is closed.
LockDevice(DeviceDescription)
Obtains a device from the OpenText Functional Testing Lab and locks it, so that only the current test can perform actions on it.
Declaration
public static IDevice LockDevice(DeviceDescription description)
Parameters
| Type | Name | Description |
|---|---|---|
| DeviceDescription | description | The DeviceDescription defined in OpenText Functional Testing Lab |
Returns
| Type | Description |
|---|---|
| IDevice |
LockDevice(DeviceDescription, ApplicationDescription[])
Obtains a device from the OpenText Functional Testing Lab and locks it, so that only the current test can perform actions on it.
Declaration
public static IDevice LockDevice(DeviceDescription description, ApplicationDescription[] appsToInstall)
Parameters
| Type | Name | Description |
|---|---|---|
| DeviceDescription | description | The DeviceDescription defined in OpenText Functional Testing Lab |
| ApplicationDescription[] | appsToInstall | An ApplicationDescription array representing additional applications to install. |
Returns
| Type | Description |
|---|---|
| IDevice |
LockDevice(DeviceDescription, ApplicationDescription[], DeviceSource)
Obtains a device from the OpenText Functional Testing Lab and locks it, so that only the current test can perform actions on it.
Declaration
public static IDevice LockDevice(DeviceDescription description, ApplicationDescription[] appsToInstall, DeviceSource deviceSource)
Parameters
| Type | Name | Description |
|---|---|---|
| DeviceDescription | description | The DeviceDescription defined in OpenText Functional Testing Lab |
| ApplicationDescription[] | appsToInstall | An ApplicationDescription array representing additional applications to install. |
| DeviceSource | deviceSource | A DeviceSource representing the source of the device to use. |
Returns
| Type | Description |
|---|---|
| IDevice |
LockDevice(DeviceDescription, DeviceSessionOptions)
Obtains a device from the OpenText Functional Testing Lab and locks it, so that only the current test can perform actions on it.
Declaration
public static IDevice LockDevice(DeviceDescription description, DeviceSessionOptions deviceSessionOptions)
Parameters
| Type | Name | Description |
|---|---|---|
| DeviceDescription | description | The DeviceDescription defined in OpenText Functional Testing Lab |
| DeviceSessionOptions | deviceSessionOptions | A DeviceSessionOptions object supplying session options. |
Returns
| Type | Description |
|---|---|
| IDevice |
LockDeviceById(string)
Obtains a device from the OpenText Functional Testing Lab by deviceID and locks it, so that only the current test can perform actions on it.
Declaration
public static IDevice LockDeviceById(string deviceId)
Parameters
| Type | Name | Description |
|---|---|---|
| string | deviceId | The device ID used by OpenText Functional Testing Lab |
Returns
| Type | Description |
|---|---|
| IDevice |
ReleaseEnvironment(IDevice)
Release the allocated device environment.
Declaration
public static void ReleaseEnvironment(IDevice device)
Parameters
| Type | Name | Description |
|---|---|---|
| IDevice | device | the device environment to release. |
ReleaseEnvironment(IBrowser)
Releases the allocated browser environment.
Declaration
public static void ReleaseEnvironment(IBrowser browser)
Parameters
| Type | Name | Description |
|---|---|---|
| IBrowser | browser | the browser environment to release. |