pechorin has asked for the wisdom of the Perl Monks concerning the following question:
I know it is controlled by Javascript but I can't seem to make any headway. I also can't seem to download wsp.pl from http://www2.research.att.com/sw/tools/wsp/ because it is asking me for a username and password. Here is the code I have so far.<label for="search_rpp">Results per page:</label> <select id="search_rpp"> <option value="10">10</option> <option value="20">20</option> <option value="30">30</option> <option value="40" selected>40</option> </select>
This produces the following error "Input "search_rpp" not found". I assume this is because the select method requires the argument to be the name, which is missing. P.S. This is my first post so please excuse any failure to conform to the monastery's conventions.#!/usr/bin/perl use strict; use WWW::Scripter; my $m = WWW::Scripter->new(); $m->use_plugin('JavaScript'); $m->agent_alias('Windows IE 6'); my $zip1 = '91502'; my $keyword = 'restaurants'; my $url = 'http://www.yelp.com'; $m->get($url); $m->forms; $m->form_number(1); $m->field('find_desc',$keyword); $m->field('find_loc', $zip1); $m->submit(); $m->select('search_rpp', '40'); $m->click();
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: WWW::Scripter Help
by Corion (Patriarch) on May 14, 2011 at 06:18 UTC | |
by pechorin (Initiate) on May 16, 2011 at 17:19 UTC | |
by Corion (Patriarch) on May 16, 2011 at 18:38 UTC |