Just a note.   the HTML standards dictate that to be proper HTML that
the value of an ID attribute must be unique on the page.   So checking
by both ID and Index is redundant.

Unless the page is not legal HTML (in which case you have a bug to
file in my opinion) you should reliably be able to find something with
just 'id' as long as it's not dynamically generated or in some other
way difficult to predict.

the use of Index really should only come into play when there's no
truely unique identifier for the object.  For example an instance
where say no id is assigned to the object, and you end up using a
different identifier like name or class, and there's more than one of
that identifier on the page.

On Apr 17, 6:57 am, "Darin Duphorn" <[email protected]>
wrote:
> To get current value you can use
>
> Text_value = $ie.text_field(:id=>"id name",:index=>index).value
>
> ________________________________
>
> From: [email protected]
> [mailto:[email protected]] On Behalf Of Durgesh Nadkarni
> Sent: Friday, April 17, 2009 7:57 AM
> To: [email protected]
> Subject: [wtr-general] How to get the values of the text box?
>
> Hi,
>
> I want to know how can we get the values of any text box in WATIR.
>
> We can use textboxname.set to enter the value in the text box.
>
> So is there any way by which we can get the dynamically generated values
> in the textbox & stored it in some variable.
>
> Thanks & Regards
> Durgesh.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to [email protected]
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~----------~----~----~----~------~----~------~--~---

Reply via email to