Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Error while using click and click_button of WWW::Mechanize

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

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

Hi,

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 (Archbishop) on Aug 08, 2019 at 05:39 UTC

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (7)
As of 2024-04-16 08:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found