addBrowsers method

Class: ConfigurationPlatform: Selenium 3Language: Java SDK:

Request that the test be run using the Ultrafast Grid to generate checkpoint images on multiple desktop browsers and viewport sizes.

Syntax


Configuration configval = config.addBrowsers(browserInfos);

Parameters

browserInfos
Type:IRenderingBrowserInfo ...

One or more browser or device configuration definitions passed as an array or multiple parameters.

Define the browser or device configurations using instances of one or more of the following classes:

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.

Remarks

You can use this method to pass a list of configurations, for example based on a configuration file instead of configuring each browser device individually using multiple calls to Configuration.addBrowser.

Example

IRenderingBrowserInfo[] browserList = {
        new DesktopBrowserInfo(viewPortWidth, viewPortHeight, BrowserType.FIREFOX),
        new ChromeEmulationInfo(DeviceName.Galaxy_Note_3, ScreenOrientation.LANDSCAPE),
        new IosDeviceInfo(IosDeviceName.iPhone_8, ScreenOrientation.PORTRAIT)
};
 /* test suite setup */  
suiteConfig = new Configuration() 
    .addBrowsers(browserList) 
    /* ... other configurations */ ; 
/*
 * Assign the configuration to all newly created Eyes instances
 */
eyes = new Eyes(runner); 
eyes.setConfiguration(suiteConfig);