Now I want to know the current URL of the ‘page’ variable. Is there a
way to do that? The link’s URL cannot be used because it redirects to
another page.
On Sun, Feb 04, 2007 at 07:40:09PM +0900, endy_tj wrote:
link1.click if link1
Now I want to know the current URL of the ‘page’ variable. Is there a
way to do that? The link’s URL cannot be used because it redirects to
another page.
link1 = page.links.find{|l| l.href.match Regexp.new(ARGV[1])}
I think that should work for you.
Hey, thanks! That works.
Another question: how can I get the URI after redirection without
loading the page? In other word, I don’t actually need the page, I
just need the new address.
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.