# Hiii

**URL:** <https://www.ruby-forum.com/t/hiii/191550>\
**Category:** Ruby\
**Created:** [July 14, 2010, 12:30pm UTC](https://www.ruby-forum.com/t/hiii/191550 "2010-07-14T12:30:37Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![vinumams](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/278dde/32.png) [@vinumams](https://www.ruby-forum.com/u/vinumams)\
**Post date:** [July 14, 2010, 12:30pm UTC](https://www.ruby-forum.com/t/hiii/191550/1 "2010-07-14T12:30:37Z")

</div>

Hi Everyone…

Can any one help me out for the below mentioned problem.

I need to build a script using RUBY. I am very newer to this tool. I  
need to click on image button which doesn’t have any ID or unique name.  
it contains only ‘href’ option. i tried,

ie.button(:src, “/Zoom\_add.gif/”).click  
ie.image\_button(:title, “Add Employer”).click  
ie.link(:src, “/I9Images/icons/Zoom\_add.gif”).click  
ie.button(:id,“rptCorpList”).click  
ie.link(:text, “Employer Name”).click

but its not working. pls help me out.

---

<div class="post-metadata">

**Author:** ![vinumams](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/278dde/32.png) [@vinumams](https://www.ruby-forum.com/u/vinumams)\
**Post date:** [July 14, 2010, 8:43pm UTC](https://www.ruby-forum.com/t/hiii/191550/2 "2010-07-14T20:43:54Z")

</div>

If all you have available is the href, you could use nokogiri to get the  
value of the href, and then either mechanize or http to GET the page at  
the link (assuming you want the HTML at that URL back):

request = Mechanize.new  
html = request.get(“startingURL”)  
page = Nokogiri::HTML(html.body)  
link = page.xpath("//xpath/to/a/@href")  
result = request.get(page)

Hope this helps.
