in reply to Re^2: How to Enter a value to a field without having name in WWW-Mechanize-Firefox
in thread How to Enter a value to a field without having name in WWW-Mechanize-Firefox

I may click through Xpath, but how will I enter a value there?

everything takes an xpath, so exactly as documented

Or select an element using the xpath method itself

(Pls check the mentioned site Source code!, Did you checked it?)

No, it doesn't load for me

See also WWW::Mechanize::Firefox::Cookbook, WWW::Mechanize::Firefox, ?node_id=3989;HIT=mechanize%20firefox;re=N, Re^5: How to browse using WWW::Mechanize::Firefox

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

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

    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

      I already told you, use an xpath

      firefox plugins xpather can help you with write xpaths

Re^4: How to Enter a value to a field without having name in WWW-Mechanize-Firefox
by Anonymous Monk on Nov 05, 2012 at 09:00 UTC

    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!

      "If possible pls write the code here"

      This is not a code writing service.

      "Actually my manager is kicking me on my head, that's why loosing my control."

      "I am fed up!"

      Consider telling your manager that you are either unable or unwilling to learn how to use the tools in question to complete the task you've been given.

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