There is a add-on for firefox called "Firebug".
With the option "Inspect", you can click at any part of the current web page, and it shows the location at the HTML code.
Then, right clicking at the html code, you have the option "Copy XPath", which copies the xpath to the clipboard.
I need to modify the Firebug add-on (or create a new one from scratch) with the following feature:
When right clicking at the html code, there is an extra option called "Copy XPath2".
When clicked, it will create an xpath. This xpath will include all the attributes for each element.
For instance:
imagine that the "Copy XPath" option would have produced the following xpath:
/html/body/table/tbody/tr[5]/td/table/tbody/tr/td/p[2]/table/tbody/tr[5]/td[2]/font
the "Copy XPath2" option could have produces the following xpath:
/html/body/table[id="main"]/tbody/tr[pos()=5 and height="30"]/td[colspan="2"]/table/tbody/tr/td/p[2]/table[id="items"]/tbody/tr[5]/td[2]/font[size="2" and color="#FF0000"]
you get the point... for every element in the xpath, it includes also the attributes.
the produced xpath needs to be a valid XPath.
+++++++++++++++++
I will need also the source code and instructions on how to install it.
Thanks,
David