By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,245 Members | 1,271 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,245 IT Pros & Developers. It's quick & easy.

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

P: 5
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
Share this Question
Share on Google+
1 Reply


nithinpes
Expert 100+
P: 410
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.