microsoft / microsoft/playwright
[BUG] browser.newContext: Unknown permission: clipboard-read for webkit
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 96.3k
- Forks
- 6.5k
- Avg merge
- 1d 6h
- Merged PRs (30d)
- 180
Description
**Context:**
- Playwright Version: 1.20.1
- Operating System: Mac
- Node.js version: 14.6
- Browser: webkit
**Code Snippet**
```
const config: PlaywrightTestConfig = {
globalTeardown: require.resolve('../src/utils/teardown'),
workers: configList.workers,
use: {
contextOptions: {
userAgent: configList.userAgent,
permissions: ['clipboard-read', 'clipboard-write']
},
```
```
test('test', async ({ browserName, page }) => {
expect(await page.screenshot({ fullPage: true, timeout: 4000 })).toMatchSnapshot(`${browserName}-EN.png`);
});
```
**Describe the bug**
Test is failing for webkit browser, if config file contains `permissions: ['clipboard-read', 'clipboard-write']` however there is not any clipboard event is being used in this test
error :
```
3) [Desktop Firefox] › search/.test.ts:38:5 › Landing page Test Suite › test
browser.newContext: Unknown permission: clipboard-read
```
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the permissions configuration shown in search/.test.ts and reproduce the failure using browser.newContext with WebKit and ['clipboard-read', 'clipboard-write']. Trace how these permissions are validated for WebKit, then add or update coverage so the intended behavior is explicit and the failing configuration no longer produces an unknown-permission error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- node.js, typescript
- Domain
- testing-qa
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100