Skip to content

[Feature]: Remove cookie/cookies from context #29662

Closed

Description

@PaulTriandafilov

🚀 Feature Request

The feature should remove specific cookie/cookies from context

Example

await context.removeCookies([cookieObject1, cookieObject2]);

Motivation

Sometimes we set cookies via globalSetup to prepare context for most cases. For example, we set cookie to hide GDPR consent modal. However, in order to write tests to cover the DGPR consent modal cookie, we must remove the cookie from the context.
I believe there are other cases where this method would be useful.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions