# Selenium: get href link by anchor text

**URL:** <https://www.ruby-forum.com/t/selenium-get-href-link-by-anchor-text/177393>\
**Category:** Rails\
**Created:** [October 16, 2009, 8:06am UTC](https://www.ruby-forum.com/t/selenium-get-href-link-by-anchor-text/177393 "2009-10-16T08:06:52Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![brijesh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/f475e1/32.png) [@brijesh](https://www.ruby-forum.com/u/brijesh)\
**Post date:** [October 16, 2009, 8:06am UTC](https://www.ruby-forum.com/t/selenium-get-href-link-by-anchor-text/177393/1 "2009-10-16T08:06:52Z")

</div>

Hi

I am using Selenium on rails plugin for automated testing in my project.

Currently I can check the links on a page by anchor text.

Now I want to check href link for that anchor text

like for [Click Here](https://www.ruby-forum.com/prj/url)

“Click here” text contain “prj/url” url…

So can anyone tell me how can I do this?

Thanks in advance  
Brijesh S.
