Skip to content

Commit

Permalink
fix: proxy
Browse files Browse the repository at this point in the history
  • Loading branch information
yihuineng committed Oct 27, 2023
1 parent b0449c2 commit 1fcc345
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/macaca-playwright.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,11 @@ class Playwright extends DriverBase {
...this.args,
};
delete launchOptions.port;
if (launchOptions.browserName === 'chromium' && os.platform() === 'win32') {
if (
this.args.proxy
&& launchOptions.browserName === 'chromium'
&& os.platform() === 'win32'
) {
// Browser proxy option is required for Chromium on Windows.
launchOptions.proxy = { server: 'per-context' };
}
Expand Down

0 comments on commit 1fcc345

Please sign in to comment.