Reputation: 8602
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.
Upvotes: 0
Views: 86
Reputation: 164799
WWW::Mechanize only works on the HTML, it has no Javascript support. For a Mechanize-like module with Javascript support, you have several options.
Upvotes: 3