openIncognitoWindow
Opens the specified URL in the browser's window. Adds
http
protocol to the URL if not present.
Examples
await openIncognitoWindow('https://google.com', { name: 'windowName' }) - Open a incognito window
Parameters
-
url -
URL to navigate page to.
-
options
-
options.namestring -
Window name (required).
-
options.waitForNavigationboolean -
Wait for navigation after the goto. Default navigationTimeout is 30 seconds to override pass
{ navigationTimeout: 10000 }inoptionsparameter.- Default value
-
true
-
options.waitForEventsArray<string> -
Events available to wait for ['DOMContentLoaded', 'loadEventFired', 'networkAlmostIdle', 'networkIdle', 'firstPaint', 'firstContentfulPaint', 'firstMeaningfulPaint', 'targetNavigated']
- Default value
-
[]
-
options.navigationTimeoutnumber -
Navigation timeout value in milliseconds for navigation after click.
- Default value
-
30000
-
options.headers -
Map with extra HTTP headers.
-
options.waitForStartnumber -
time to wait for navigation to start. Accepts value in milliseconds.
- Default value
-
100
Returns
Promise<void>