¡Nuevo curso! ¡Todo programador debería aprender IA Generativa!
Prueba una lección gratuita0
Can someone explain wrong output for clicking first two elements of the page from this code?
Get unique selector of clicked HTML element https://code.sololearn.com/WMAZk7B2MOk9/?ref=app
3 Respuestas
0
I found the solution: instead of using ' ' (space) as separator between nested levels of selector should use '>'. So selectors look like BODY>:NTH-CHILD(1).
0
What incorrect output?
0
For example, if you clicked the "First paragraph" it outputs:
=================
You've clicked "First paragraphGrandchildGrandchildSecond div header". It's unique selector isBODY :NTH-CHILD(1)
==================
But should output just:
++++++++++++++++++
You've clicked "First paragraph". It's unique selector is BODY :NTH-CHILD(1)
++++++++++++++++++
Why there is other elements content?