Skip to main content

Configuring browsers for the Ultrafast Grid (UFG)

When it comes to multiple browsers and mobile devices, the Ultrafast grid shines. You can run one functional test, and in the background have multiple screenshots rendered for different browsers, viewport sizes, and mobile devices.

The API methods are:

  • configuration.add_browser(browser) to add a single browser configuration.
  • configuration.add_browsers(browser1, browser2, ...) to add single or multiple browser configurations.

Here are examples for how to execute visual tests on different browsers and platforms:

Desktop browsers

from applitools.playwright import BrowserType

configuration = eyes.configuration
configuration.add_browser(1400, 700, BrowserType.CHROME)
configuration.add_browser(1200, 900, BrowserType.FIREFOX)
configuration.add_browser(1200, 900, BrowserType.SAFARI)
configuration.add_browser(1200, 900, BrowserType.EDGE_CHROMIUM)
configuration.add_browser(1200, 900, BrowserType.IE_11)

Chrome device emulation

Predefined device:

from applitools.playwright import DeviceName, ChromeEmulationInfo, ScreenOrientation

configuration = eyes.configuration
configuration.add_browser(
ChromeEmulationInfo(DeviceName.Galaxy_S5, ScreenOrientation.LANDSCAPE)
)
configuration.add_browser(
ChromeEmulationInfo(DeviceName.iPhone_11_Pro, ScreenOrientation.PORTRAIT)
)

iOS device

from applitools.playwright import IosDeviceInfo, IosDeviceName, IosVersion, ScreenOrientation

configuration = eyes.configuration
configuration.add_browser(
IosDeviceInfo(IosDeviceName.iPhone_11_Pro, ScreenOrientation.PORTRAIT)
)
configuration.add_browser(
IosDeviceInfo(IosDeviceName.iPad_9, ScreenOrientation.PORTRAIT, IosVersion.LATEST)
)
configuration.add_browser(
IosDeviceInfo(IosDeviceName.iPhone_12_Pro_Max, IosVersion.ONE_VERSION_BACK)
)

Possible values for IosVersion are:

  • IosVersion.LATEST - the latest iOS version that's supported by the UFG
  • IosVersion.LATEST_ONE_VERSION_BACK' - one version prior to the latest version

For a list of supported devices, see Devices.