Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re^2: WWW::Mechanize, radio buttons, and clicking a named button

by Kanji (Parson)
on May 04, 2006 at 19:49 UTC ( #547501=note: print w/ replies, xml ) Need Help??


in reply to Re: WWW::Mechanize, radio buttons, and clicking a named button
in thread WWW::Mechanize, radio buttons, and clicking a named button

While <readmore> tags are helpful, I think you would have seen more response if you had provided the minimalist test case as that makes it much easier to separate the wheat from the chaff.

It also isn't as difficult as you seem to think: make a copy of the problem page (or code) and start hacking away bits of the copy.

For the HTML you posted, that would have resulted in something like...

<form name="lmSelect" method="post"> <input type=button value="Delete Load Manager" name=delService title="Delete a Load Manager from the SLA."> </form>

It really limits where the problem might be when you only have 3 lines of HTML returning the same error as the 371-line page you pointed people to. :-)

Anyhoo, your problem:-

WWW::Mechanize (well, HTML::Form actually) only supports "submit" and "image" type buttons for clicking, and not the "button" type buttons that are used on your form.

The reason for this is "button" type buttons are meant for use with JavaScipt or some other client-side scripting, which WWW::Mechanize doesn't support.

Fortunately, there's an easy workaround, which you can find details and examples of by Super Searching for "update_html".

    --k.



Comment on Re^2: WWW::Mechanize, radio buttons, and clicking a named button
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://547501]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (10)
As of 2014-12-19 22:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (93 votes), past polls