setBrowsersInfo method

Class: ConfigurationPlatform: NightwatchLanguage: 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:
        | DeviceName
        | "BlackBerry Z30"
        | "Blackberry PlayBook"
        | "Galaxy A5"
        | "Galaxy Note 10"
        | "Galaxy Note 10 Plus"
        | "Galaxy Note 2"
        | "Galaxy Note 3"
        | "Galaxy Note 4"
        | "Galaxy Note 8"
        | "Galaxy Note 9"
        | "Galaxy S10"
        | "Galaxy S10 Plus"
        | "Galaxy S3"
        | "Galaxy S5"
        | "Galaxy S8"
        | "Galaxy S8 Plus"
        | "Galaxy S9"
        | "Galaxy S9 Plus"
        | "Kindle Fire HDX"
        | "LG G6"
        | "LG Optimus L70"
        | "Laptop with HiDPI screen"
        | "Laptop with MDPI screen"
        | "Laptop with touch"
        | "Microsoft Lumia 550"
        | "Microsoft Lumia 950"
        | "Nexus 10"
        | "Nexus 4"
        | "Nexus 5"
        | "Nexus 5X"
        | "Nexus 6"
        | "Nexus 6P"
        | "Nexus 7"
        | "Nokia Lumia 520"
        | "Nokia N9"
        | "OnePlus 7T"
        | "OnePlus 7T Pro"
        | "Pixel 2"
        | "Pixel 2 XL"
        | "Pixel 3"
        | "Pixel 3 XL"
        | "Pixel 4"
        | "Pixel 4 XL"
        | "iPad"
        | "iPad 6th Gen"
        | "iPad 7th Gen"
        | "iPad Air 2"
        | "iPad Mini"
        | "iPad Pro"
        | "iPhone 11"
        | "iPhone 11 Pro"
        | "iPhone 11 Pro Max"
        | "iPhone 4"
        | "iPhone 5/SE"
        | "iPhone 6/7/8"
        | "iPhone 6/7/8 Plus"
        | "iPhone X"
        | "iPhone XR"
        | "iPhone XS"
        | "iPhone XS Max";
      screenOrientation?: ScreenOrientation | "landscape" | "portrait";
    }
)[];
List of objects that define browsers and emulated devices to be rendered.

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.