Skip to content

Proposal: event wrapper #75

@amh4r

Description

@amh4r

What's the feasibility for creating an event wrapper that mimics the user-event API? Not something that actually uses user-event, but rather makes Puppeteer event code look like user-event code.

For example, instead of this:

await page.keyboard.type("Gordon")
await page.keyboard.press("Tab")
await page.keyboard.type("Freeman")

You'd do something like this:

const user = userEvent.setup(page)
await user.keyboard("Gordon")
await user.tab()
await user.keyboard("Freeman")

It seems straightforward, but are there dragons I'm missing?

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