Filling unnamed text fields in Mechanize::Firefox

67 Views Asked by At

I'm trying to fill some unnamed fields using $mech->fields but I ran out of hair on my head to pull off, please help.

<input id="af-city" class="input-field af-city" autocomplete="address-level2" type="text" aria-required="true" placeholder="">
<input id="af-zip" class="input-field postal-code-validate af-zip" autocomplete="postal-code" type="text" aria-required="true" placeholder="">

have tried using xpath, no use, adding a dot or a hash in front of the id to let $mech know this is an id not a name, no use.

$mech->field( ".af-city", "Monsey");
$mech->field( {xpath => '//*[@id="af-zip"]'}, "10952");
0

There are 0 best solutions below