DEV Community

Cover image for Playwright Awesome Selectors
Vibhanshu Jain
Vibhanshu Jain

Posted on

Playwright Awesome Selectors

Check out my short post on Playwright Awesome Selectors

My personal favourite is page.getByRole(role, options)
eg:

await page.getByRole('button', { name: 'Sign in' }).click();
Enter fullscreen mode Exit fullscreen mode

Do tell me yours...😀

Top comments (0)