While using the following code for accessing JS input box, it gives error 
message
undefined method `click_no_wait' for #<Watir::Image:0x4d2d9e0> (NoMethodError), 
below is the code, please help me out.
 
 
require 'watir\contrib\enabled_popup' 

  def startClicker( button , waitTime=9, user_input=nil)
    hwnd = $ie.enabled_popup(waitTime)  # get a handle if one exists 
    if (hwnd)  # yes there is a popup
      w = WinClicker.new
      if ( user_input )
        w.setTextValueForFileNameField(hwnd, "#{user_input}")
      end
      sleep 3  # I put this in to see the text being input it is not necessary 
to work

    w.clickWindowsButton_hwnd(hwnd, "#{button}")  # "OK" or whatever the name 
on the button is
      w=nil    # this is just cleanup
    end
  end

  $ie=Watir::IE.start("c:\test.htm") 
  $ie.image(:index,'4').click_no_wait
  startClicker("OK", 7, "User Input")

Thanks


                
__________________________________________________________
Yahoo! India Answers: Share what you know. Learn something new
http://in.answers.yahoo.com/
_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general

Reply via email to