Override Device Mode (overrides device dimensions).

Usage

.setDeviceDimensions({width, height, deviceScaleFactor, mobile}, [callback])

Parameters

Name Type description
metrics object
callback
Optional
function

Optional callback function to be called when the command finishes.

Example

 this.demoTest = function (browser) {
   browser
     .setDeviceDimensions({
       width: 400,
       height: 600,
       deviceScaleFactor: 50,
       mobile: true
       })
     .navigateTo('https://www.google.com');
 };