From: Edouard Dantes Date: 2009-01-29T19:11:46+09:00 Subject: clicking links in mechanize with :text=> nokogiri.css('a.l') Hi, i cannot click links in mechanize through their text content. i tried the following but get error with link_with(:text => '') method or using the whole text content obtained through nokogiri parser method css('a.l') that points to google results. what am i doing wrong? thanks for input #!/usr/bin/env ruby require 'rubygems' require 'mechanize' $KCODE='UTF8' @agent= WWW::Mechanize.new @page=@agent.get('http://www.google.com/search?q=parsing') puts @agent.click @page.link_with(:text => 'parsing') <===?? @page.parser.css('a.l').each do |l| puts @agent.click(l).inner_text end <===?? -- Posted via http://www.ruby-forum.com/.