Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

Error while using click and click_button of WWW::Mechanize

by aijazfatima20 (Initiate)
on Aug 08, 2019 at 04:44 UTC ( #11104137=perlquestion: print w/replies, xml ) Need Help??

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


The page source looks like this:

<div id="loadProject" class="header" style="margin-bottom:0px;"> <div class="row"> <div class="col-md-9" style="margin-bottom: 10px;padding-left: 50px;"> <h1 style="font-size:36px;">DocGen4 <small>Generator</small></h1> <p>Click the Load Project(s) button to begin generating documentation. +</p> </div> <div class="col-md-3"> <div class="text-center" style="margin-top:35px;"> <button type="button" class="btn btn-default" ng-click="loadProject()" + ng-class="{'btn-success': loadHover, disabled: submitting}" ng-mouse +enter="loadHover = true" ng-mouseleave="loadHover = false"> <div ng-hide="submitting"> <i class="glyphicon glyphicon-plus"></i> Load Project(s) </div> <div ng-show="submitting"> <i class="fa fa-cog fa-spin"></i> Submitting project... </div> </button> </div> </div> </div> </div>

I want to click the button, which appears in the web page as "Load Project(s)". I am using the following command, which does not work:

use WWW::Mechanize; my $mech = 'WWW::Mechanize'->new; my $url = "***"; //I have hided the website as it is internal to the + company. $mech->get("$url"); $mech->click('loadProject()'); #$mech->click_button(id => 'loadProject');

The error I get is as following: No clickable input with name loadProject() Please let me know what should I provide in the click or click_button?

Replies are listed 'Best First'.
Re: Error while using click and click_button of WWW::Mechanize
by haukex (Chancellor) on Aug 08, 2019 at 05:39 UTC

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://11104137]
Approved by haukex
Front-paged by Corion
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (9)
As of 2019-08-23 14:30 GMT
Find Nodes?
    Voting Booth?

    No recent polls found