Skip to content

Add hook name into the beforeHook and afterHook function in the wdio config #11132

@HananArgov

Description

@HananArgov

beforeHook and afterHook are called each time there's a hook.
sometimes we want to call them just for specific hook, like beforeAll hook as an example

i'm suggesting that we'll add adding a hook name to the functions arguments.

i've already made local changes, and saw that this work

here are screen grabs of the code and the log (the spec file prints the hooks names):
image
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    Idea 💡A new feature ideahelp wantedIssues that are free to take by anyone interested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions