I am trying to get hidden field with mechanize in ruby and trying to click on it.
agent = Mechanize.new
agent.get('http://www.example.com/')
agent.page.link_with(:text => "More Links...")
But this gives me:
=> nil
Actually, I want to click on it:
agent.page.link_with(:text => "More Links...").click
But this is an error:
undefined method `click' for nil:NilClass
And here is my HTML code:
<div id="rld-4" class="results_links_more highlight_d links_deep" style="display: none;">
<a class="large" href="javascript:;">More Links...</a>
</div>