dergachev / chrome-xpath-link

8 stars 5 forks source link

Handle named anchor tags #1

Open dergachev opened 11 years ago

dergachev commented 11 years ago

Visit http://guides.macrumors.com/Taking_Screenshots_in_Mac_OS_X#Shortcuts Right click on "Shortcuts" heading, and select "Link to Element".

The shortcuts section has a named anchor, but chrome-xpath-link doesn't pick it up and instead assigns it the following xpath: http://guides.macrumors.com/Taking_Screenshots_in_Mac_OS_X#bodyContent/h2

A related enhancement would be to formulate links relative to previous siblings that have IDs.

Potential xpath solutions is via following-sibling: