I am using watir version 1.5.1.1100.


I am trying to enter value in span field, here is the relevant snippet of html:

<span id="tradeDate"><input type="hidden"
value="12/18/2006"><input style="DISPLAY: inline; VERTICAL-ALIGN:
middle; WIDTH: 110px" value="12/18/2006" autocomplete="off"
size="20"></span>



I am using code

require 'watir'

test_site='C:\\aa.htm'

ie=Watir::IE.start(test_site)

ie.span(:id,"tradeDate").text_field(:value,"12/18/2006").set("01/01/2000")



though it enters value in the field but after entering values in the
field give error message which breaks my code, here is the error
message:



NoMethodError: undefined method `fireEvent' for nil:NilClass

    from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1100/./watir.rb:3843:in 
`set'

    from (irb):5

    from :0



Here, is the relevant code from watir.rb which is generating error message:

    def set(setThis)

      assert_enabled

      assert_not_readonly

      

      highlight(:set)

      @o.scrollIntoView

      @o.focus

      @o.select

      @o.fireEvent("onSelect")

      @o.value = ""

      @o.fireEvent("onKeyPress")

      doKeyPress(setThis)

      highlight(:clear)

       @o.fireEvent("onChange")

       @o.fireEvent("onBlur")

     end



Please help me out from this.



Thanks in advance

Vikash





Send free SMS to your Friends on Mobile from your Yahoo! Messenger. Download 
Now! http://messenger.yahoo.com/download.php
_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general

Reply via email to