http://qs1969.pair.com?node_id=957907

mmittiga17 has asked for the wisdom of the Perl Monks concerning the following question:

Hi All, Quick question on how to follow a link in mech firefox. Any help is greatly appreciated. Link Code:

<a class="ctl00_Menu1_1 DynamicMenuItemStyle ctl00_Menu1_6" href="java +script:LoadinIframe('InvestmentDetail.aspx?FromMenu=Y&amp;MainMenu=Y' +,'Investment Detail','Yes')" target="_self" style="border-style:none; +font-size:1em;">Investment Detail</a>

I have tried each of these methods with no luck:

$mech->follow_link( text_contains=> '//a[text() = "Investment Detail" +]' ); $mech->follow_link( url_regex => qr/InvestmentDetail.aspx/i ); $mech->follow_link( xpath => '//a[text() = "Investment Detail"]' ); $mech->follow_link( text => 'Investment Detail',n => 12 );

Any thoughts? Thanks!!