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.link(:text, “Employer Name”).click

but its not working. pls help me out.

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.