New issue
Advanced search Search tips

Issue 848159 link

Starred by 3 users

Issue metadata

Status: Assigned
Owner:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 3
Type: Bug



Sign in to add a comment

DevTools: "copy selector" doesn't work with duplicate ids.

Project Member Reported by lushnikov@chromium.org, May 31 2018

Issue description

Repro steps:

1. Navigate to data:text/html,<div id="foo">one</div><div id="foo">two</div>
2. Open DevTools > Elements Panel
3. Select second DIV -> Right click in DevTools -> Copy -> Selector
4. Check out the selector

Actual: The selector is just "#foo"; this is useless since it points to multiple elements in page.
Expected: body > div:nth-child(2)

Despite having multiple elements with the same ID is a bad practice, it's very common and could be even found on www.youtube.com.

Originally reported: https://github.com/GoogleChrome/puppeteer/issues/2614

 

Sign in to add a comment