Skip to content

[Feature]: Cookie Assertions in PageAssertions #1877

@gamestheory

Description

@gamestheory

🚀 Feature Request

Verifying cookies is essential for testing authentication and session states. Currently, developers must manually call page.context().cookies(), which does not support the auto-waiting convenience of the assertThat API.

Example

Proposed Methods: assertThat(page).hasCookie(String name), assertThat(page).hasCookieValue(String name, String value).

Motivation

API Consistency: Brings cookie verification into the same PageAssertions family as hasTitle() and hasURL().
Handling Asynchronicity: Automatically polls for the cookie to be set.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions