position() XPath Function
position() is an optional XPath function
It returns the position of a node within a node-set (starting from 1)
Practical Demonstration
//p[1] selects the first p element
//p[position()=1] same as above
//p[2] selects the second p element
//p[position()=2] same as above
(//input)[1] selects the first input element
(//input)[position()=1] same as above
Key Point:
Using [n] is shorthand for [position()=n] in XPath.
En esta página del sitio puede ver el video en línea 86. position() function in XPath Expressions (Selenium Java 2026) de Duración hora minuto segunda en buena calidad , que subió el usuario QAFox 16 mayo 2026, comparta el enlace con amigos y conocidos, en youtube este video ya ha sido visto 59 veces y le gustó 1 a los espectadores. Disfruta viendo!