######################
def browser_with_handle(hwnd)
found_ie = nil
while found_ie == nil do
shell = WIN32OLE.new("Shell.Application")
shellWindows = shell.windows()
shellWindows.each do |wnd|
tmp_hwnd = -1
begin
tmp_hwnd = wnd.hwnd
rescue
#nothing much just ignore.
end
#Best bet is to compare as a string
if tmp_hwnd.to_s == hwnd.to_s
found_ie = wnd
#Break out of the current set of shell windows loop
break
end
end
end
return found_ie
end
###################### arvind wrote: Hi All,I want to attach one IE browser to another. But everytime the title of the window will be changing dynamically. Is it possible to attach IE by using the window handle ? Can anyone please help ? Thanks Arvind --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=4999&messageID=13920#13920 _______________________________________________ Wtr-general mailing list [email protected] http://rubyforge.org/mailman/listinfo/wtr-general |
smime.p7s
Description: S/MIME Cryptographic Signature
_______________________________________________ Wtr-general mailing list [email protected] http://rubyforge.org/mailman/listinfo/wtr-general
The future of web testing