We are using the enabled_popup.rb to handle window pop-up
messages...We return the text found in that window to validate we are
getting the correct message for the correct field:

def get_window_message(ie, title='Microsoft Internet Explorer',
btn="OK")
begin
    hwnd = ie.enabled_popup(30)           # get a handle if
oneexists
  rescue
    foundwind = false
  end
  windowtext = '' * 256
  if (hwnd)
    w = WinClicker.new
    w.makeWindowActive(hwnd)
    windowtext = w.getStaticTextFromWindow(title, hwnd)
    w.clickWindowsButton_hwnd(hwnd, "#{btn}")
  end
  return(windowtext.to_s())


What is happening is that if the mouse just happens to be over a field
that has a alt description the text is displaying and it appears that
the routine is finding that "popup" and continuing to the next line of
code...causing the test to fail   Any suggestions as to how to prevent
this from happening and only find the window and not alt text
"popup"?  Running Watir 1.6.2 with Ruby 1.8.6 patchlevel 111.

Thanks in advance!
Jackie

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to [email protected]
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~----------~----~----~----~------~----~------~--~---

Reply via email to