In General
There is no standard interpretation of xpath="1"
in HTML because there is no standard xpath
attribute on a select
element (or any other HTML element). You've stumbled across some application's idiosyncratic markup; you'll have to consult the application's authors, documentation, or source code to learn the semantics of xpath="1"
.
Note further that the proper way to add an application or user specific attribute would have been to name it with a data-
prefix: data-xpath
.
Specific Application
There is an XPath utility, ChroPath, that runs as a browser extension and writes xpath
(and css
) attributes on elements. Credit: Randy Casburn answer to What is the significance of the attribute xpath="1" while constructing locators for Selenium tests