简体   繁体   English

WWW :: Mechanize :: Firefox单击链接

[英]WWW::Mechanize::Firefox click a link

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> 我试图单击一个链接,该链接的值在<a href="alwaysdifferenthere">123456</a>

The code above doesn't click a link. 上面的代码没有单击链接。 I am doing this wrong? 我做错了吗?

use WWW::Mechanize::Firefox;
my $mech = WWW::Mechanize::Firefox->new();
...
$mech->follow_link( tag => 'a', text => '123456' );

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM