setViewportSize method

Class: ConfigurationPlatform: WebdriverIO 5Language: JavaScript SDK:

Set the viewport size to be used by the browser for the test.

Syntax


let configval = config.setViewportSize(value);

Parameters

value
Type:<a class ='link' href='/Content/api/eyes-sdk/index-gen/class-rectanglesize-webdriverio_sdk5-javascript.htm'>RectangleSize</a>|RectangleSizeObject
An object that defines the width and height of the test browser viewport in pixels.
RectangleSizeObject
The type RectangleSizeObject is defined as: {width:number,height:number}

Return value

Type: <a class ='link' href='/Content/api/eyes-sdk/index-gen/class-configuration-webdriverio_sdk5-javascript.htm'>Configuration</a>
The value returned is the object that called the method. This allows you to use a fluent style to call the setXXXX methods of this class.