Skip to content

Device - puppeteerApp

Kind: global class

The related functions of mobile devices

Device.width

Get the device screen width

Kind: static property of Device

Device.height

Get the device screen height

Kind: static property of Device

Device.rotation

Get the device screen rotation

Kind: static property of Device

Device.density

Get the device screen density

Kind: static property of Device

Device.isPortrait

Check if the device is in portrait mode

Kind: static property of Device

Device.isLandscape

Check if the device is in landscape mode

Kind: static property of Device

Device.screenWidthForOrientation

Get the screen width for a specific orientation

Kind: static property of Device

ParamTypeDescription
orientationstring(Orientation)

Device.screenHeightForOrientation

Get the screen height for a specific orientation

Kind: static property of Device

ParamTypeDescription
orientationstring(Orientation)

Device.isWifi

Check if the device is connected to WiFi

Kind: static property of Device

Device.getLocalIp