AddBrowsers method

Class: ConfigurationPlatform: Selenium 3Language: C# SDK:

Request that the checkpoint be rendered by the Ultrafast Grid using the specified desktop browsers and viewport sizes.

Syntax

IConfiguration configval = config.AddBrowsers(browsersInfo);

Parameters

browsersInfo
Type:IRenderBrowserInfo[]

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: IConfiguration
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 instead of configuring each browser device individually using multiple calls to AddBrowser.

Example

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