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

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions