0

I have this following line

$agent->follow_link( xpath => '//a[text() = "123456"]' );

I am trying to click a link that has a value in <a href="alwaysdifferenthere">123456</a>

The code above doesn't click a link. I am doing this wrong?

Grigor
  • 4,139
  • 10
  • 41
  • 79

1 Answers1

5
use WWW::Mechanize::Firefox;
my $mech = WWW::Mechanize::Firefox->new();
...
$mech->follow_link( tag => 'a', text => '123456' );
Ωmega
  • 42,614
  • 34
  • 134
  • 203