Hello Watir Experts!

I'm experincing some problems following solutions given in
http://wiki.openqa.org/display/WTR/JavaScript+Pop+Ups

When i use Click => the code stops execution there
So i used Click_no_wait so that code proceeds further.
But the problem here is that , When i use Click_no_wait my browser
doesn't show a popup at all and the startClicker method waits till
wait time and produces exception
I dont know where I'm wrong
Please help me am struck.

Below is code snippet
================
buttonCreateSave.click_no_wait   #produces javascript alert box
startClicker("OK",7,nil)

my startClicker method is as follows
==========================
def startClicker( button , waitTime= 9, user_input=nil )
  hwnd = $ie.enabled_popup(waitTime)
  if (hwnd)  # yes there is a popup
    w = WinClicker.new
    if ( user_input )
      w.setTextValueForFileNameField( hwnd, "#{user_input}" )
    end
      w.clickWindowsButton_hwnd( hwnd, "#{button}" )
      w=nil
  end
end






-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com

Reply via email to