Skip to content

Commit

Permalink
fix: permisions配置在firefox下报错 (#51)
Browse files Browse the repository at this point in the history
  • Loading branch information
yihuineng committed Feb 6, 2024
1 parent f36363b commit 4e09341
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 5 additions & 4 deletions lib/macaca-playwright.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,13 +79,14 @@ class Playwright extends DriverBase {
}
this.browserType = await playwright[launchOptions.browserName];
this.browser = await this.browserType.launch(launchOptions);
const permissions = launchOptions.browserName === 'chromium' ? [
'clipboard-read',
'clipboard-write',
] : [];
const newContextOptions: TContextOptions = {
locale: this.args.locale,
ignoreHTTPSErrors: true,
permissions: [
'clipboard-read',
'clipboard-write',
],
permissions,
};

if (this.args.proxy) {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "macaca-playwright",
"version": "1.11.18",
"version": "1.11.19",
"description": "Macaca Playwright driver",
"keywords": [
"playwright",
Expand Down

0 comments on commit 4e09341

Please sign in to comment.