addBrowser method

Class: ConfigurationPlatform: Selenium 3Language: Java SDK:

Request that the Ultrafast Grid generate checkpoint images using a particular desktop browser and viewport size.

Syntax


IConfigurationSetter configval = config.addBrowser(browserInfo);

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

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

Parameters

browserInfo
Type:<a class ='link' href='/Content/api/eyes-sdk/index-gen/class-renderbrowserinfo-selenium-java.htm'>RenderBrowserInfo</a>
An object that defines the attributes of the browser and the viewport.
width
Type:int
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.
height
Type:int
The height of the browser viewport for this target. There is no height limit.
browserType
Type:<a class ='link' href='/Content/api/eyes-sdk/enums-gen/enum-global-browsertype-selenium-java.htm'>BrowserType</a>
The type of browser for this target.
baselineEnvName
Type:String
The name of the baseline environment. If provided, then the viewport, host app (browser), and OS that define the baseline are defined by the baseline environment name and not by the execution environment. The name should already be defined in the Test manager. If it is not defined, then it will be created based on the execution environment of the first test that uses that name. For more information see Working with cross-environment tests.

Return value

Type: IConfigurationSetter
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.

Remarks

By default, the entire page is rendered. The viewport width and height parameters impact the baseline that is chosen, unless the baseline environment configuration or parameter has been provided. The viewport passed to the Eyes.open 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.