Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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: 2 additions & 3 deletions docs/helpers/Playwright.md
Original file line number Diff line number Diff line change
Expand Up @@ -518,12 +518,11 @@ I.checkOption('Agree', '.signup', { position: { x: 5, y: 5 } })

### clearCookie

Clears a cookie by name,
if none provided clears all cookies.
Clears all cookies. Playwright currently doesn't support to delete a certain cookie.

```js
I.clearCookie();
I.clearCookie('test');
I.clearCookie('test'); // currently has the same effect as line above
```

#### Parameters
Expand Down
2 changes: 1 addition & 1 deletion lib/helper/Playwright.js
Original file line number Diff line number Diff line change
Expand Up @@ -1892,7 +1892,7 @@ class Playwright extends Helper {
*/
async clearCookie() {
// Playwright currently doesn't support to delete a certain cookie
// https://github.com/microsoft/playwright/blob/main/docs/api.md#class-browsercontext
// https://github.com/microsoft/playwright/blob/main/docs/src/api/class-browsercontext.md
if (!this.browserContext) return;
return this.browserContext.clearCookies();
}
Expand Down