Skip to content

[Feature]: Support for Passing Parameters to workerFixture #35756

@bubafinder

Description

@bubafinder

🚀 Feature Request

Is it possible to introduce a way to pass parameters to the workerFixture? Maybe it could be done via project settings or some other mechanism.

I haven’t explored in depth how this could technically be achieved or whether it’s currently feasible within the framework, but having this capability would significantly increase the flexibility and usability of worker fixtures, even if it adds a bit of complexity.

Example

Send a parameter to the worker fixture from the project settings in the Playwright config. That parameter should be used for some logic, for example, if true is sent, use one credentials set, if false, use another credentials set.

Motivation

In my test suite, I have multiple test sets scoped by project, and each project uses specific credentials. If I could pass project-specific parameters into the workerFixture, it would simplify credential handling. I don't know how to set it currently.

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