How to verify Playwright Selectors 🎭?

Sanjay Kumar
2 min readJul 31, 2022

--

Playwright has introduced lots of new functions to write the selectors which are very helpful to locate the element in the webpage.

But do you know these Playwright selectors can’t be verified in DevTools through

“ctrl+f” or “console”

To verify these Playwright selectors, we need to follow below steps-

  1. Open the web page by executing the playwright code i.e. open page in playwright window using the below command

PWDEBUG=1 node filename.js

2. Open console in the window.
3. playwright.$$(“selector value”)
4. Press Enter

This complete process takes a lot of time to verify just one Playwright Selectors so to make it simple we have added support in SelectorsHub for Playwright selectors and now Playwright selectors can also be verified like any other selectors just in one click without any code execution etc.

Just open SelectorsHub, paste your playwright selectors and press enter.

Download Link of SelectorsHub-

https://selectorshub.com/

Verify Playwright in SelectorsHub

To learn more about it with real time example, please follow below tutorial-

--

--

Sanjay Kumar
Sanjay Kumar

Written by Sanjay Kumar

Founder and Creator of SelectorsHub, TestCase Studio, TestCaseHub & ChroPath | Speaker | Blogger | Automation Passionate