I think you are calling the wrong method for what it looks like you are trying to do.
.value returns the current value in the text field.. to set the text field to a particular string you want .set current_text = browser.text_field(:id, "info").value #get the text field contents puts browser.text_field(:id, "info").value #display the current text field contents browser.text_field(:id, "info").set = "test" #set the text field contents On Apr 9, 4:27 am, Jarmo Pertman <jarm...@gmail.com> wrote: > Hi. > > I stumbled into one interesting problem, which haven't happened > before. I tried to access text_field with id, and got link object > instead. > > Here is my commands and output: > $browser.text_field(:id, "info").value = "test" > unknown property or method: `value' > HRESULT error code:0x80020006 > Unknown name. > c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/input_elements.rb: > 349:in `method_missing' > c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/input_elements.rb: > 349:in `value=' > > $browser.text_field(:id, "info").html > "<A id=info class=someclassname href=\"javascript:methodcall('param') > \">my link</A>" > > When doing .flash, then link is flashing indeed. > > How is this even possible? There isn't actually any text_fields with > that id on that page. Why did Watir pick that link up just because it > had "info" as it's id? > > Jarmo --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---