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 SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic BrowserlaunchBrowser(BrowserDescription description) Launches a new browser tab returning an instance ofBrowserfor the launched browser.static BrowserlaunchBrowser(BrowserType browserType) Launches a new browser tab returning an instance ofBrowserfor the launched browser.static DevicelockDevice(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 DevicelockDevice(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 DevicelockDevice(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 DevicelockDevice(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 DevicelockDeviceById(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 voidreleaseEnvironment(Device device) Release the allocated device environment.static voidreleaseEnvironment(Browser browser) Releases the allocated browser environment.
- 
Constructor Details- 
SrfLabpublic SrfLab()
 
- 
- 
Method Details- 
launchBrowserLaunches a new browser tab returning an instance ofBrowserfor 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 Browserfor the launched browser.
- Throws:
- GeneralLeanFtException- if error occurs during execution
 
- 
launchBrowserLaunches a new browser tab returning an instance ofBrowserfor 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 Browserfor the launched browser.
- Throws:
- GeneralLeanFtException- if error occurs during execution
 
- 
lockDeviceObtains 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
 
- 
lockDeviceByIdObtains 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
 
- 
lockDevicepublic 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
 
- 
lockDevicepublic 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
 
- 
lockDevicepublic 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- a- DeviceSessionOptionsobject supplying session options.
- Returns:
- the requested device.
- Throws:
- GeneralLeanFtException- if an error occurs during execution
 
- 
releaseEnvironmentReleases the allocated browser environment.- Parameters:
- browser- the browser environment to release.
- Throws:
- GeneralLeanFtException- if an error occurs during execution
 
- 
releaseEnvironmentRelease the allocated device environment.- Parameters:
- device- the device environment to release.
- Throws:
- GeneralLeanFtException- if an error occurs during execution
 
 
-