in reply to How to Enter a value to a field without having name in WWW-Mechanize-Firefox

Can any one Pls guide me how to do this.

No. Read WWW::Mechanize::Firefox::Examples and/or ...

  • Comment on Re: How to Enter a value to a field without having name in WWW-Mechanize-Firefox

Replies are listed 'Best First'.
Re^2: How to Enter a value to a field without having name in WWW-Mechanize-Firefox
by Anonymous Monk on Nov 05, 2012 at 02:30 UTC

    Thanks Monk, I read that before asking this question(+ documentation + cookbook also)! I am just a beginner and I didn't find a way to do that, that's why I asked here.

    I may click through Xpath, but how will I enter a value there?(Pls check the mentioned site Source code!, Did you checked it?)

    Here, the beginners like me are asking for solutions & not an amazing advice.

        To enter a value to a field, we need the "name" normally, like  $mech->field(name => $value) and here i do not have a name associated with it. Pls check the below Source code for that

        <input class="getaquotepagezipcodefield" id="iaQuoteByZip" type="text" style="background-color: rgb(255, 255, 255); ">

        Or Can we do it some other way? I don't know and I didn't see it till now. Also how can we enter a value to a field using Xpath, Can you pls give a code here

        Man, I am really sorry! Actually my manager is kicking me on my head, that's why loosing my control. :)

        Actually I need to write a pincode like "10027" on a field. and for that we can use like  $mech->field( user => 'joe' ); where 'user' stands for the 'name' attribute. but in my case there is no name associated to it. pls see the code below,

        <input class="getaquotepagezipcodefield" id="iaQuoteByZip" type="text" style="background-color: rgb(255, 255, 255); ">

        Here there is no 'name' attribute, all you got is 'class', 'id', 'type', 'style' (and no 'name'). then how can we use this code,  $mech->field( user => 'joe' ); ? Or can we modify this code?, If possible pls write the code here. I am fed up! Thanks!

      A reply falls below the community's threshold of quality. You may see it by logging in.