Package com.hp.lft.sdk
Class SrfLab
java.lang.Object
com.hp.lft.sdk.SrfLab
This class can be used to launch browsers or lock devices in the SRF lab.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Browser
launchBrowser
(BrowserDescription description) Launches a new browser tab returning an instance ofBrowser
for the launched browser.static Browser
launchBrowser
(BrowserType browserType) Launches a new browser tab returning an instance ofBrowser
for the launched browser.static Device
lockDevice
(DeviceDescription description) Obtains a device from the OpenText Functional Testing Lab and locks it so that only the current test can perform actions on it.static Device
lockDevice
(DeviceDescription description, ApplicationDescription[] appsToInstall) Obtains a device from the OpenText Functional Testing Lab and locks it so that only the current test can perform actions on it.static Device
lockDevice
(DeviceDescription description, ApplicationDescription[] appsToInstall, DeviceSource deviceSource) Obtains a device from the OpenText Functional Testing Lab and locks it so that only the current test can perform actions on it.static Device
lockDevice
(DeviceDescription description, DeviceSessionOptions sessionOptions) Obtains a device from the OpenText Functional Testing Lab and locks it, so that only the current test can perform actions on it.static Device
lockDeviceById
(String deviceId) Obtains a device from the OpenText Functional Testing Lab and locks it so that only the current test can perform actions on it.static void
releaseEnvironment
(Device device) Release the allocated device environment.static void
releaseEnvironment
(Browser browser) Releases the allocated browser environment.
-
Constructor Details
-
SrfLab
public SrfLab()
-
-
Method Details
-
launchBrowser
Launches a new browser tab returning an instance ofBrowser
for the launched browser.
The returned browser instance is valid until the tab is closed.- Parameters:
browserType
- browserType of browser to launch. Possible values:BrowserType
- Returns:
- The
Browser
for the launched browser. - Throws:
GeneralLeanFtException
- if error occurs during execution
-
launchBrowser
Launches a new browser tab returning an instance ofBrowser
for the launched browser.
The returned browser instance is valid until the tab is closed.- Parameters:
description
- the description of the browser to launch.- Returns:
- The
Browser
for the launched browser. - Throws:
GeneralLeanFtException
- if error occurs during execution
-
lockDevice
Obtains a device from the OpenText Functional Testing Lab and locks it so that only the current test can perform actions on it.- Parameters:
description
- the description of the device to obtain.- Returns:
- the requested device.
- Throws:
GeneralLeanFtException
- if an error occurs during execution
-
lockDeviceById
Obtains a device from the OpenText Functional Testing Lab and locks it so that only the current test can perform actions on it.- Parameters:
deviceId
- the ID of the device in OpenText Functional Testing Lab.- Returns:
- the requested device.
- Throws:
GeneralLeanFtException
- if an error occurs during execution
-
lockDevice
public static Device lockDevice(DeviceDescription description, ApplicationDescription[] appsToInstall) throws GeneralLeanFtException Obtains a device from the OpenText Functional Testing Lab and locks it so that only the current test can perform actions on it.- Parameters:
description
- the description of the device to obtain.appsToInstall
- an array of ApplicationDescription representing the applications to install.- Returns:
- the requested device.
- Throws:
GeneralLeanFtException
- if an error occurs during execution
-
lockDevice
public static Device lockDevice(DeviceDescription description, ApplicationDescription[] appsToInstall, DeviceSource deviceSource) throws GeneralLeanFtException Obtains a device from the OpenText Functional Testing Lab and locks it so that only the current test can perform actions on it.- Parameters:
description
- the description of the device to obtain.appsToInstall
- an array of ApplicationDescription representing the applications to install.deviceSource
- the source of the device to use. (OpenText Functional Testing Lab, AWS Device Farm, Any)- Returns:
- the requested device.
- Throws:
GeneralLeanFtException
- if an error occurs during execution
-
lockDevice
public static Device lockDevice(DeviceDescription description, DeviceSessionOptions sessionOptions) throws GeneralLeanFtException Obtains a device from the OpenText Functional Testing Lab and locks it, so that only the current test can perform actions on it.- Parameters:
description
- the description of the device to obtain.sessionOptions
- aDeviceSessionOptions
object supplying session options.- Returns:
- the requested device.
- Throws:
GeneralLeanFtException
- if an error occurs during execution
-
releaseEnvironment
Releases the allocated browser environment.- Parameters:
browser
- the browser environment to release.- Throws:
GeneralLeanFtException
- if an error occurs during execution
-
releaseEnvironment
Release the allocated device environment.- Parameters:
device
- the device environment to release.- Throws:
GeneralLeanFtException
- if an error occurs during execution
-