Hi:

The attached the snap shot of my webpage which has 2 blocks both identical
in terms of class names, text field names etc.

*To access the NG ID field i gave the below script:*

puts " Step 5: Enter the ngid as ATP00594978"
@ie.text_field(:name, 'ngids', :index, 2).set('ATP00594978')

For this i get this error:

Error:
test_3_Authorize_User(CSDPUIHomePage):
ArgumentError: wrong number of arguments (4 for 2)
    auth_unath.rb:42:in `text_field'
    auth_unath.rb:42:in `test_3_Authorize_User'

*But if i give the following:*

puts " Step 5: Enter the ngid as ATP00594978"
@ie.text_field(:name, 'ngids').set('ATP00594978')

It always updates the first NG ID.


Let me know if i am missing out on something

Regards
Venu

On Sat, Feb 7, 2009 at 10:21 PM, Charley Baker <charley.ba...@gmail.com>wrote:

> Multiple attributes for input elements are now supported in the latest
> version of Watir - 1.6.2. The wiki has also been updated.
>
>
> Charley Baker
> blog: http://charleybakersblog.blogspot.com/
> Lead Developer, Watir, http://wtr.rubyforge.org
> QA Architect, Gap Inc Direct
>
>
>
> On Fri, Feb 6, 2009 at 11:20 PM, Vens <venugopal.devarako...@gmail.com>wrote:
>
>>
>> Hi:
>>
>> I just started using Watir for automating few web UIs. During this I
>> came across a situation where I had to put in data to a text field but
>> incidently there are 2 text boxes having the same name. Please look at
>> the snippet below:
>>
>> <div class="boxed">
>> <h3 class="title"> Authorize NG IDs </h3>
>>  <form action="ser.do" method="post" name="sAFrm">
>>   <input type="hidden" value="authorize" name="dispatch"/>
>>   <table>
>>  <tbody>
>>        <tr>
>>        <td colspan="2"><div class="infomark"> You can enter comma
>> separated multiple ngids </div></td>
>>        </tr>
>>        <tr>
>>              <th> MID </th>
>>              <td> <select size="1" name="mid"></select></td>
>>       </tr>
>>        <tr>
>>              <th> NG IDs </th>
>>               <td><input type="text" value="" size="100"
>> maxlength="200"
>> name="ngids"/></td>
>>       </tr>
>> </tbody>
>> </table>
>> </form>
>> </div>
>>
>> <div class="boxed">
>> <h3 class="title"> Authorize NG IDs </h3>
>>  <form action="ser.do" method="post" name="sAFrm">
>>   <input type="hidden" value="unauthorize" name="dispatch"/>
>>   <table>
>>  <tbody>
>>        <tr>
>>        <td colspan="2"><div class="infomark"> You can enter comma
>> separated multiple ngids </div></td>
>>        </tr>
>>        <tr>
>>              <th> MID </th>
>>              <td> <select size="1" name="mid"></select></td>
>>        </tr>
>>        <tr>
>>              <th> NG IDs </th>
>>               <td><input type="text" value="" size="100"
>> maxlength="200"
>> name="ngids"/></td>
>>       </tr>
>> </tbody>
>> </table>
>> </form>
>> </div>
>>
>> When I looked into
>> http://wiki.openqa.org/display/WTR/Multiple+Attributesit
>> said it is not implemented for input elements.  Can you help me solve
>> this.
>>
>> Regards
>> Venu
>>
>>
>>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~----------~----~----~----~------~----~------~--~---

<<inline: snapshot.JPG>>

Reply via email to