469,275 Members | 1,817 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,275 developers. It's quick & easy.

How to access forms < id > using Win32::IE::Mechanize->new( )

Hello All,

How do we access form using Win32::IE::Mechanize->new( ) ?
I know we have a method

$mech->form_name('"name") .But what if the form has only the 'id' attribute and no name attribute,

In this case how do we access the form through Win32::IE::Mechanize->new()

Kindly reply


Mithun
Mar 19 '08 #1
1 1723
nithinpes
410 Expert 256MB
Hello All,

How do we access form using Win32::IE::Mechanize->new( ) ?
I know we have a method

$mech->form_name('"name") .But what if the form has only the 'id' attribute and no name attribute,

In this case how do we access the form through Win32::IE::Mechanize->new()

Kindly reply


Mithun
If the form does not have name, you can make use of form_number() method.
This recognizes a form by its number(though not 'id'). The forms in the current page will be numbered from 1 onwards.

Expand|Select|Wrap|Line Numbers
  1. $mech ->form_number($number);
  2.  
Check this for info.
Mar 19 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

1 post views Thread by CARIGAR | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.