#!/usr/local/perls/perl-5.20.0/bin/perl use v5.10; use strict; use warnings; use diagnostics; use WWW::Mechanize::Firefox; use HTTP::Cookies; my $FEXdms = 'http://www.financeexpress.com/'; my $web_page = 'current'; my $mech = WWW::Mechanize::Firefox->new( tab => $web_page, activate => 1, # bring the tab to the foreground autoclose => 0 # to prevent autoclosing of the Tab ); $mech->get( $FEXdms ); $mech->click_button( name=> "btnLogin" );
---------------- results -----------------------------
Uncaught exception from user code: No elements found for //*(translate(local-name(.), "ABCDEFGHIJKLMNOPQRSTUVWX YZ", "abcdefghijklmnopqrstuvwxyz") = "button" and @name="btnLogin") or (translate(loc al-name(.), "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "abcdefghijklmnopqrstuvwxyz")="input" and @ type="button" or @type="submit" and @name="btnLogin") at test.pl line 20.
WWW::Mechanize::Firefox::signal_condition(WWW::Mechanize::Firefox=HASH(0x2644 b94), "No elements found for //*[(translate(local-name(.), \"ABCDEFGH"...) called at C:/Perl/site/lib/WWW/Mechanize/Firefox.pm line 2640
WWW::Mechanize::Firefox::xpath(WWW::Mechanize::Firefox=HASH(0x2644b94), "//*[ (translate(local-name(.), \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\", \""..., "node", undef, "sin gle", 1, "user_message", "Button name 'btnLogin' unknown") called at C:/Perl/site/lib /WWW/Mechanize/Firefox.pm line 3065
WWW::Mechanize::Firefox::click_button(WWW::Mechanize::Firefox=HASH(0x2644b94) , "name", "btnLogin") called at test.pl line 20
---------------------------------------------------
In reply to can't click a simple button by backyardbill
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |