Search code examples
htmlunit

HtmlUnit Get Title of HtmlAnchor


I don't see this method in the documentation, http://htmlunit.sourceforge.net/apidocs/com/gargoylesoftware/htmlunit/html/HtmlAnchor.html

Is there a way to get the Title attribute from an HtmlAnchor?


Solution

  • I found what I wanted shortly after posting this question (through trial and error):

    anchor.getAttribute("title")