Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

try ignoring https errors #384

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ inputs:
required: false
runs:
using: 'docker'
image: 'docker://lostpixel/lost-pixel:v3.16.0'
# image: 'docker://lostpixel/lost-pixel:v3.16.0'
# for branch testing
# image: 'Dockerfile'
image: 'Dockerfile'
7 changes: 6 additions & 1 deletion src/shots/shots.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import path from 'node:path';
import { mapLimit } from 'async';
import type {
Browser,
BrowserContextOptions,
BrowserType,
PageScreenshotOptions,
} from 'playwright-core';
Expand All @@ -20,7 +21,11 @@ const takeScreenShot = async ({
shotItem: ShotItem;
logger: ReturnType<typeof log.item>;
}): Promise<boolean> => {
const context = await browser.newContext(shotItem.browserConfig);
const modifiedBrowserConfig: BrowserContextOptions = {
...shotItem.browserConfig,
ignoreHTTPSErrors: true,
};
const context = await browser.newContext(modifiedBrowserConfig);
const page = await context.newPage();
let success = false;

Expand Down