com.hp.lft.sdk

Class SrfLab



  • public class SrfLab
    extends java.lang.Object
    This class can be used to launch browsers or lock devices in the SRF lab.
    • Constructor Detail

      • SrfLab

        public SrfLab()
    • Method Detail

      • launchBrowser

        public static Browser launchBrowser(BrowserType browserType)
                                     throws GeneralLeanFtException
        Launches a new browser tab returning an instance of Browser 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 an error occurs during execution.
      • launchBrowser

        public static Browser launchBrowser(BrowserDescription description)
                                     throws GeneralLeanFtException
        Launches a new browser tab returning an instance of Browser 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 an error occurs during execution.
      • lockDevice

        public static Device lockDevice(DeviceDescription description)
                                 throws GeneralLeanFtException
        Obtains a device from the Mobile Center lab and locks it so that only the current LeanFT 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

        public static Device lockDeviceById(java.lang.String deviceId)
                                     throws GeneralLeanFtException
        Obtains a device from the Mobile Center lab and locks it so that only the current LeanFT test can perform actions on it.
        Parameters:
        deviceId - the ID of the device in Mobile Center.
        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 Mobile Center lab and locks it so that only the current LeanFT 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 Mobile Center lab and locks it so that only the current LeanFT 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 lab, platform, or service hosting the device.
        Returns:
        the requested device.
        Throws:
        GeneralLeanFtException - if an error occurs during execution