简体   繁体   中英

`WWW::Mechanize Won't Fill Form Out

I am trying to fill out a form on a website using WWW::Mechanize but the form is embedded in a script, not the usual <form> tag

<script>
    component_lang["ib4"] = {};
</script>
<script type="text/x-handlebars-template" id="ib4-tpl">
        <form class="component component-form" id="input" enctype="multipart/form-data" method="post" action="/" >
<div class="input-group type-firstlast">
    <div class="input-label">
        <label>Your Name</label>
    </div>
    <div class="inputs columns">
        <div class="column-2 column-first"><input type="text" name="first"  placeholder="First Name" value=""></div>
        <div class="column-2"><input type="text" name="last"  placeholder="Last Name" value=""></div>
    </div>
</div>
</form>     </script>
<li id="ib4" class="form page-component-has-overflow"></li>

How would I use WWW::Mechanize to fill this form out? The mech-dump utility did not find any forms on the page.

WWW::Mechanize only works on the HTML, it has no Javascript support. For a Mechanize-like module with Javascript support, you have several options.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM