Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Highlight element in the browser #2747

Closed
phileba opened this issue Jun 29, 2020 · 4 comments
Closed

[Feature] Highlight element in the browser #2747

phileba opened this issue Jun 29, 2020 · 4 comments

Comments

@phileba
Copy link

phileba commented Jun 29, 2020

As the user, I want to have a method to highlight and reveal in devtools if those are opened, something like:

const element = page.$(selector)
await element.inspect()
@pavelfeldman pavelfeldman self-assigned this Jun 29, 2020
@Snooz82
Copy link
Contributor

Snooz82 commented Jul 6, 2020

So how shall it behave?

page.inspect('#elem1')   //highlights element 1

page.inspect('#elem2')   //switches highlight from element 1 to element 2

?

IMO it would be nice to have the css that highlights as an option.
Like page.inspect(selector[, style])
page.inspect('#element', '{border: 4px dotted blue;}')

regards

@phileba
Copy link
Author

phileba commented Sep 22, 2020

Hi guys, any updates?

@dgozman dgozman changed the title Highlight element in the browser [Feature] Highlight element in the browser Nov 24, 2020
@phileba
Copy link
Author

phileba commented Jan 5, 2021

Hi guys, any updates?

@pavelfeldman
Copy link
Member

A combination of PWDEBUG and playwright.$ is very similar to this request. See https://playwright.dev/docs/inspector for more details. Please open new bugs for missing features in the inspector!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants