addBrowser method

Class: ConfigurationPlatform: Selenium 4Language: JavaScript SDK:

Use this method to request that the Ultrafast Grid generate a checkpoint images for a particular target desktop browser.

You may define multiple targets with different browsers and viewports by calling this method as many times as required. Eyes will produce a test results for each such configuration. Alternatively, you can pass a list of browsers and devices to the method addBrowsers.


let configval = config.addBrowser(width, height, browserType);



The width of the browser viewport for this target. The maximum viewport width for all browsers is 5120. If this limit is exceeded, then execution of the checkpoint will fail.

Use this in conjunction with the browserType parameter.


The height of the browser viewport for this target. There is no height limit.

Use this in conjunction with the browserType parameter.


The type of browser for this target.

suiteConfig = new Configuration()
   .addBrowser(viewPortWidth, viewPortHeight, BrowserType.CHROME) //same as DesktopBrowserInfo 

Return value

Type: Configuration
The value returned is the object that called the method. This allows you to use a fluent style to call the setXXXX methods of the Configuration class.


By default, the entire page is rendered. The viewport width and height parameters impact the baseline that is chosen, unless the baseline environment configuration has been provided. The viewport passed to the method does not impact the baseline used, but could impact the page layout if the page has any viewport size-sensitive factors such as HTML, CSS or Javascript.