Skip to content

Feature request: waitForSelectorShadowDOM() #16

@thernstig

Description

@thernstig

Currently, all test code in Jest looks like this when you want to get an element:

const btn = (await page.waitForFunction(() => 
    querySelectorShadowDom.querySelectorDeep(".btn-in-shadow-dom")
)).asElement();
await btn.click();

Since waitForSelector is probably one of the most common functions, it would be nice if the package could add some shortcut to this like: waitForSelectorShadowDOM that directly can be used like:

await btn = waitForSelectorShadowDOM('path');

p.s. Thank you for a great package @Georgegriff !

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