The highlighter is designed to grab the content you most often want quickly so that you're not having to write manual xpaths, therefore it has certain behaviours depending on the elements you are highlighting that will be covered here.
Highlighting images
When you select an image the highlighter is going to automatically pull out the URL of the image and include that in the markup. It will correct for relative URLs to ensure a full URL is included.
Highlighting Links
Similar to images when you highlight a link by default it will extract the location the link goes to not what the text of a link says. If you want the text of the link you can edit the xpath by adding /text() to the end so if you're xpath is //a[@class="my-link"] you would end up with //a[@class="my-link"]/text()
Highlighting Videos
When you select a video the highlighter will try and fetch more details about the video pull the id of the video and running it through our video service to get the description thumbnail etc and build a VideoObject type for you.
Highlighting Audio elements
Similar to links the highlighter will grab the source of the audio which is the reference to the file instead of the player or another attribute.
Highlighting Meta elements
If you create an xpath that points to a meta element on the page the highlighter will extract the content attribute by default unless given an alternative attribute via the xpath.
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article