How to get full CSS selector path?

I need to get full CSS selector path for element like this

html > body > div > div:eq(1) > div > div:eq(4) > div > div:eq(1) > div > div:eq(0) > p:eq(21)

but what I get currently from Chrome for example is something like…


This content originally appeared on DEV Community 👩‍💻👨‍💻 and was authored by Martin Adams

I need to get full CSS selector path for element like this

html > body > div > div:eq(1) > div > div:eq(4) > div > div:eq(1) > div > div:eq(0) > p:eq(21)

but what I get currently from Chrome for example is something like this

#post_1 > div:nth-child(2) > div.topic-body.clearfix.highlighted > div.topic-meta-data > div.names.trigger-user-card > span > a
Any tool to get the full path ?


This content originally appeared on DEV Community 👩‍💻👨‍💻 and was authored by Martin Adams


Print Share Comment Cite Upload Translate Updates
APA

Martin Adams | Sciencx (2023-01-21T23:07:08+00:00) How to get full CSS selector path?. Retrieved from https://www.scien.cx/2023/01/21/how-to-get-full-css-selector-path/

MLA
" » How to get full CSS selector path?." Martin Adams | Sciencx - Saturday January 21, 2023, https://www.scien.cx/2023/01/21/how-to-get-full-css-selector-path/
HARVARD
Martin Adams | Sciencx Saturday January 21, 2023 » How to get full CSS selector path?., viewed ,<https://www.scien.cx/2023/01/21/how-to-get-full-css-selector-path/>
VANCOUVER
Martin Adams | Sciencx - » How to get full CSS selector path?. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2023/01/21/how-to-get-full-css-selector-path/
CHICAGO
" » How to get full CSS selector path?." Martin Adams | Sciencx - Accessed . https://www.scien.cx/2023/01/21/how-to-get-full-css-selector-path/
IEEE
" » How to get full CSS selector path?." Martin Adams | Sciencx [Online]. Available: https://www.scien.cx/2023/01/21/how-to-get-full-css-selector-path/. [Accessed: ]
rf:citation
» How to get full CSS selector path? | Martin Adams | Sciencx | https://www.scien.cx/2023/01/21/how-to-get-full-css-selector-path/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.