Skip to content

Browser-Context/Page Configurations

Headless, SlowMo and other Browser Context Options

Browser Context Options

The following options can be set while creating a Browser Context :

Options
Description
setHeadless By default, this is true. If you set it as false, you will see the browsers opening up during execution
startMaximized By default, this is false. If you set it as true, you will see the browsers opening up as maximized
setSlowMo This is slow down the execution by N milliseconds per operation
setChannel Browser distribution channel. Supported values are chrome, chrome-beta, chrome-dev, chrome-canary, msedge, msedge-beta, msedge-dev, msedge-canary.
setChromiumSandbox Enable Chromium sandboxing. Defaults to false.
setDevtools Chromium-only. Whether to auto-open a Developer Tools panel for each tab. If this option is true, the headless option will be set false.
setDownloadsPath If specified, accepted downloads are downloaded into this directory. Otherwise, temporary directory is created and is deleted when browser is closed. In either case, the downloads are deleted when the browser context they were created in is closed.
setExecutablePath Path to a browser executable to run instead of the bundled one. If executablePath is a relative path, then it is resolved relative to the current working directory. Note that Playwright only works with the bundled Chromium, Firefox or WebKit, use at your own risk.
setTimeout Maximum time in milliseconds to wait for the browser instance to start. Defaults to 30000 (30 seconds). Pass 0 to disable timeout.
setProxy Proxy to be used for all requests. HTTP and SOCKS proxies are supported, for example http://myproxy.com:3128 or socks5://myproxy.com:3128. Short form myproxy.com:3128 is considered an HTTP proxy.

In INGenious Playwright Studio you can specify all of these in the Configuration Window like this :

context


Emulation

Emulation

Playwright can emulate various devices by specifying the following options when creating a context :

  • setDeviceScaleFactor
  • setHasTouch
  • setIsMobile
  • setScreenSize
  • setUserAgent
  • setViewportSize

In INGenious Playwright Studio you can specify all of these in the Configuration Window like this :

emulator

The complete list of Playwright supported device configurations can be found here


Locale and Timezone

Locale and Timezone

Emulate the user Locale and Timezone which can be set globally for all tests in the config and then overridden for particular tests.

  • setLocale
  • setTimezoneId

In INGenious Playwright Studio you can specify all of these in the Configuration Window like this :

locale