Sha256: 62dc75b18ffe343858285336e6fcb47b8385b7fd49971c7b465d3a97784d9ae0
Contents?: true
Size: 623 Bytes
Versions: 5
Compression:
Stored size: 623 Bytes
Contents
# http://www.vbcity.com/forums/topic.asp?tid=108859 require 'watir-classic/ie' module Watir module PageContainer include Win32 def enabled_popup(timeout=4) # Use handle of our parent window to see if we have any currently # enabled popup. hwnd_modal = 0 Wait.until(timeout) do hwnd_modal, arr = GetWindow.call(hwnd, GW_ENABLEDPOPUP) hwnd_modal > 0 end # use hwnd() method to find the IE or Container hwnd (overriden by IE) if hwnd_modal == hwnd() || 0 == hwnd_modal hwnd_modal = nil end hwnd_modal end end end
Version data entries
5 entries across 5 versions & 1 rubygems