setBrowsersInfo method

Class: ConfigurationPlatform: Selenium 4Language: JavaScript SDK:

Sets the devices to be rendered on the Ultrafast Grid.

The method sets the full list of all the browsers to be rendered on the Ultrafast Grid, removing any previously defined browsers. This method differs from the methods addBrowser and addDeviceEmulation, which build the list of browsers and devices incrementally (i.e. each call to addXXXX adds more browsers to the list of browsers to be rendered). If you call setBrowsersInfo after calling any of the addXXXX methods then the devices configured by the addXXXX will be lost. You may call the addXXXX methods after the setBrowsersInfo method to add more browsers to the list of browsers to be rendered.

Syntax

let configval = config.setBrowsersInfo(browsersInfo);
config.browsersInfo = configval;
configval = config.browsersInfo;

Note that this feature is available as both a method and a property.

Parameters

browsersInfo
Type:
(
  | DesktopBrowserInfo
  | ChromeEmulationInfo
  | IOSDeviceInfo
  | { deviceName: DeviceNamePlain; screenOrientation?: ScreenOrientationPlain }
)[];
List of objects that define browsers and emulated devices to be rendered.

Type definitions

DeviceNamePlain
This type allows passing strings instead of enumerated values, for the list of enum values see DeviceName.
ScreenOrientationPlain
This type allows passing strings instead of enumerated values, for the list of enum values see ScreenOrientation.

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.