Package com.hp.lft.sdk.web
Class EmulatedDevice
java.lang.Object
com.hp.lft.sdk.web.EmulatedDevice
- All Implemented Interfaces:
Environment,EmulatedEnvironment
The description of an emulated mobile device test object.
-
Constructor Summary
ConstructorsConstructorDescriptionInitializes a new instance of the EmulatedDevice class.EmulatedDevice(String name, int width, int height, double scaleFactor, boolean touchable, boolean mobile, String userAgent) Initializes a new instance of the EmulatedDevice class with the initialization parameters. -
Method Summary
Modifier and TypeMethodDescriptionstatic EmulatedDeviceGalaxyS5()Returns the predefined Samsung Galaxy S5 emulated device.intReturns the height of the emulated device screen (in pixels).getName()Returns the name of the emulated device.doubleReturns the scale factor of the emulated device screen.Returns the userAgent property of the emulated device.intgetWidth()Returns the width of the emulated device screen (in pixels).static EmulatedDeviceIPad()Returns the predefined IPad emulated device.static EmulatedDeviceIPhone5()Returns the predefined iPhone 5 emulated device.static EmulatedDeviceIPhone6()Returns the predefined iPhone 6 emulated device.static EmulatedDeviceReturns the predefined iPhone 6 Plus emulated device.booleanisMobile()Returns true if the emulated device is mobile device.booleanReturns true if the emulated device screen touch feature is enabled.static EmulatedDeviceNexus5X()Returns the predefined Nexus 5X emulated device.static EmulatedDeviceNexus6P()Returns the predefined Nexus 6P emulated device.voidsetHeight(int height) Sets height of the emulated device screen (in pixels).voidsetMobile(boolean mobile) Sets the mobile property of the emulated device.voidSets name of the emulated device.voidsetScaleFactor(double scaleFactor) Sets the scale factor of the emulated device screen.voidsetTouchable(boolean touchable) Sets the touchable property of the emulated device screen.voidsetUserAgent(String userAgent) Sets the userAgent property of the emulated device.voidsetWidth(int width) Sets width of the emulated device screen (in pixels).
-
Constructor Details
-
EmulatedDevice
public EmulatedDevice()Initializes a new instance of the EmulatedDevice class. -
EmulatedDevice
public EmulatedDevice(String name, int width, int height, double scaleFactor, boolean touchable, boolean mobile, String userAgent) Initializes a new instance of the EmulatedDevice class with the initialization parameters.- Parameters:
name- the emulated device name.width- the emulated device screen width.height- the emulated device screen height.scaleFactor- the emulated device screen scale factor.touchable- the emulated device screen can use the touch feature.userAgent- the emulated device user agent.mobile- the emulated device is mobile device.
-
-
Method Details
-
setName
Sets name of the emulated device.- Specified by:
setNamein interfaceEmulatedEnvironment- Parameters:
name- the device name.
-
getName
Returns the name of the emulated device.- Specified by:
getNamein interfaceEmulatedEnvironment- Returns:
- name of the emulated device.
-
setWidth
public void setWidth(int width) Sets width of the emulated device screen (in pixels).- Specified by:
setWidthin interfaceEmulatedEnvironment- Parameters:
width- the width of the emulated device screen (in pixels).
-
getWidth
public int getWidth()Returns the width of the emulated device screen (in pixels).- Specified by:
getWidthin interfaceEmulatedEnvironment- Returns:
- the width of the emulated device screen (in pixels).
-
setHeight
public void setHeight(int height) Sets height of the emulated device screen (in pixels).- Specified by:
setHeightin interfaceEmulatedEnvironment- Parameters:
height- the height of the emulated device screen (in pixels).
-
getHeight
public int getHeight()Returns the height of the emulated device screen (in pixels).- Specified by:
getHeightin interfaceEmulatedEnvironment- Returns:
- the height of the emulated device screen (in pixels).
-
setScaleFactor
public void setScaleFactor(double scaleFactor) Sets the scale factor of the emulated device screen.- Specified by:
setScaleFactorin interfaceEmulatedEnvironment- Parameters:
scaleFactor- the scale factor of the emulated device screen.
-
getScaleFactor
public double getScaleFactor()Returns the scale factor of the emulated device screen.- Specified by:
getScaleFactorin interfaceEmulatedEnvironment- Returns:
- the scale factor of the emulated device screen.
-
setTouchable
public void setTouchable(boolean touchable) Sets the touchable property of the emulated device screen.- Specified by:
setTouchablein interfaceEmulatedEnvironment- Parameters:
touchable- the touchable property of the emulated device screen.
-
isTouchable
public boolean isTouchable()Returns true if the emulated device screen touch feature is enabled.- Specified by:
isTouchablein interfaceEmulatedEnvironment- Returns:
- true if the emulated device screen touch feature is enabled.
-
setUserAgent
Sets the userAgent property of the emulated device.- Specified by:
setUserAgentin interfaceEmulatedEnvironment- Parameters:
userAgent- the userAgent property of the emulated device.
-
getUserAgent
Returns the userAgent property of the emulated device.- Specified by:
getUserAgentin interfaceEmulatedEnvironment- Returns:
- the userAgent property of the emulated device.
-
setMobile
public void setMobile(boolean mobile) Sets the mobile property of the emulated device.- Specified by:
setMobilein interfaceEmulatedEnvironment- Parameters:
mobile- the mobile property of the emulated device.
-
isMobile
public boolean isMobile()Returns true if the emulated device is mobile device.- Specified by:
isMobilein interfaceEmulatedEnvironment- Returns:
- true if the emulated device is mobile device.
-
GalaxyS5
Returns the predefined Samsung Galaxy S5 emulated device.- Returns:
- the predefined Samsung Galaxy S5 emulated device.
-
Nexus5X
Returns the predefined Nexus 5X emulated device.- Returns:
- the predefined Nexus 5X emulated device.
-
Nexus6P
Returns the predefined Nexus 6P emulated device.- Returns:
- the predefined Nexus 6P emulated device.
-
IPhone5
Returns the predefined iPhone 5 emulated device.- Returns:
- the predefined iPhone 5 emulated device.
-
IPhone6
Returns the predefined iPhone 6 emulated device.- Returns:
- the predefined iPhone 6 emulated device.
-
IPhone6Plus
Returns the predefined iPhone 6 Plus emulated device.- Returns:
- the predefined iPhone 6 Plus emulated device.
-
IPad
Returns the predefined IPad emulated device.- Returns:
- the predefined IPad emulated device.
-