Forum Discussion

ḥari's avatar
Frequent Contributor
2 years ago

How to verify hyperlinks



Here I have attached image there "Test complete samples" are href links. How can I verify while mouse Hover to that element it shows underline and color change??


Any inbuilt methods available in TC!!!




Thanks team!

2 Replies

  • rraghvani's avatar
    Champion Level 3

    Default style links are rendered by the browser. However, if the website is using CSS for styling links then you should be able to get the attributes, see Getting CSS Attributes.


    You can use getAttribute('href') method to return the URL.

    • ḥari's avatar
      Frequent Contributor

      To get the font color can I use like this


      var color = page.FindElement("xpath");