ray.rick.mini has asked for the wisdom of the Perl Monks concerning the following question:
Hello, I'm trying to scrape a web service page, to create an automatic reporting bot. I'm able to login to the page, and navigate through it until the final page. This page is the one containing my wanted information. Before extracting them through text() or content(), I need to set some modifiers on the page, to modify records visualized. I m not into web devel, but I guess the page is really JS enriched. I click on a link, and this action opens a dropdown menu list with all the choices, used as a filter. I'm able to find the TR/TD to select, but when I click on it, nothing happens and the dropdown list remains "opened".
if(&wait_visible_continue('//a[@class="btn btn3d selectionbtn"]')){ $mech->click( {xpath => '//a[@class="btn btn3d selectionbtn"]'}); print "Click Menu done..\n"; } #Here I have the dropdown visualized on screen. #Next snippet doesn't produce the selection of the wanted row if(&wait_visible_continue('//td[contains(text(),"Group")]')){ $mech->click( {xpath => '//td[contains(text(),"Group")]'}); print "Choose the right voice from dropdown done..\n"; }
Here is a snippet of the html page, this particular one is the "\<a'\>" tag I click on, to open the dropdown
<a href="javascript:" class="btn btn3d selectionbtn" style="top:0; lef +t:112; width:19; height:19;">
Here is the row/column I try to click on without success..
<tr class="MenuTableRow"><td class="MenuEntryName" nowrap="">Group</td +><td class="MenuEntryNoSub" arvalue="Group"></td></tr>
and here is some obscure html code in the page near the link I use to raise the dropdown
Thanks for any hints.<label class="label f9 do" for="x-arid301159400" style="top: 4px; left +: 0px; width: 81px; height: 17px;">Console View</label><div class="se +lection" style="top:0; left:82; width:133; height:21;" arselmenu="[{v +:"Group"},{v:"Date"},{v:"Any"}]"> <input id="arid301159400" class="text " readonly="" style="top:0; left +:0; width:112; height:19;" type="text"> <a href="javascript:" class="btn btn3d selectionbtn" style="top:0; lef +t:112; width:19; height:19;">
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: WWW::Mechanize::Firefox ->click() problem
by ray.rick.mini (Sexton) on Sep 26, 2016 at 21:42 UTC |