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?


In reply to Error while using click and click_button of WWW::Mechanize by aijazfatima20

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.