Try ie.frame("ContextTree").text_field(:index, 2).value = "wasup?"

As a general rule, setting the value of a field via value= often works when set fails.

Bret

On 2/6/06, Paul Carvalho <[EMAIL PROTECTED]> wrote:
I found some of the classes and methods for working with Hiddenfields, but all this programming stuff is a bit too terse for me.(Dammit Jim, I'm a tester not a programmer! ;))
I tried the following:> ie.frame("ContextTree").hiddens.length=> Returns a value of 8. (matches the number identified via "show_all_objects")
> ie.frame("ContextTree").text_fields.length=> Returned a value of 2. (This is interesting, because only one inputfield is visible.)
When I tried to input text into the first text_field, it appeared asexpected.  When I tried to input text into the second input field, Igot the following:
> ie.frame("ContextTree").text_field(:index, 2).set("wasup?")=> WIN32OLERuntimeError: focus    OLE error code:800A083E in htmlfile      Can't move focus to the control because it is invisible, notenabled, or of a type that does not accept the focus.[snip]
So, how do I send info to this input field?  Do I use something likethe following?> ie.frame("ContextTree").hidden(:id, "_ContextList1:Tree").set("wasup?")
I think I'm mixing apples and oranges here.  The second text inputfield doesn't have a "hidden" attribute, yet it is "invisible".
This tree control will be the end of me yet.  I think I've found a wayto bypass it using the URL.  If that works, I'm going to give up ontrying to manipulate the UI directly with Watir.  This is one timewhere the mouse is mightier than the keyboard.  Sigh.
Cheers.  Paul.
BTW, does anyone know a tool that will allow me to see what info IEpasses from one page to another?  SpySmith is nice for viewing staticinformation on a page, but not for showing me what's being passed fromone page to another.  TIA.

On 03/02/06, Bret Pettichord <[EMAIL PROTECTED]> wrote:> There are tricks you sometimes (always?) have to use to enter text with> hidden text fields. But watir can see hidden fields without any special> problem and the error you are getting is because watir can't find it. So you> are still have problems with the identification.>> Bret
_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general

_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general

Reply via email to