Skip to content

openIncognitoWindow()

Opens the specified URL in the browser’s window. Adds http protocol to the URL if not present.

await openIncognitoWindow('https://google.com', { name: 'windowName' }) - Open a incognito window
NameTypeDescription
urlstringURL to navigate page to.
optionsObjectDefault: {}.
options.namestringWindow name (required).
options.waitForNavigationbooleanWait for navigation after the goto. Default navigationTimeout is 30 seconds to override pass { navigationTimeout: 10000 } in options parameter. Default: true.
options.waitForEventsArrayEvents available to wait for [‘DOMContentLoaded’, ‘loadEventFired’, ‘networkAlmostIdle’, ‘networkIdle’, ‘firstPaint’, ‘firstContentfulPaint’, ‘firstMeaningfulPaint’, ‘targetNavigated’] Default: [].
options.navigationTimeoutnumberNavigation timeout value in milliseconds for navigation after click. Default: 30000.
options.headersObjectMap with extra HTTP headers.
options.waitForStartnumbertime to wait for navigation to start. Accepts value in milliseconds. Default: 100.
TypeDescription
Promise<void>