Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions lib/helper/Playwright.js
Original file line number Diff line number Diff line change
Expand Up @@ -517,8 +517,9 @@ class Playwright extends Helper {
if (this.options.userAgent) contextOptions.userAgent = this.options.userAgent;
if (this.options.locale) contextOptions.locale = this.options.locale;
if (this.options.colorScheme) contextOptions.colorScheme = this.options.colorScheme;
this.contextOptions = contextOptions;
if (!this.browserContext || !restartsSession()) {
this.browserContext = await this.browser.newContext(contextOptions); // Adding the HTTPSError ignore in the context so that we can ignore those errors
this.browserContext = await this.browser.newContext(this.contextOptions); // Adding the HTTPSError ignore in the context so that we can ignore those errors
}
}

Expand Down Expand Up @@ -606,7 +607,7 @@ class Playwright extends Helper {
page = await browser.firstWindow();
} else {
try {
browserContext = await this.browser.newContext(Object.assign(this.options, config));
browserContext = await this.browser.newContext(Object.assign(this.contextOptions, config));
page = await browserContext.newPage();
} catch (e) {
if (this.playwrightOptions.userDataDir) {
Expand Down