Manish Sapariya wrote:
Hi,
How do break out of x.times loop.
10.times do
findWindowLike(nil, /^Microsoft Internet Explorer$/, //) {|win|
puts "#{win.getClassName}\t#{win.getWindowText}"
#p win.getWindowRect
#p win
if(win.getParent().hwnd == $ie.hwnd) then
#p $ie.hwnd, win.getParent().hwnd
popupwin=win
p "Found appropriate parent...Breaking"
break
end
}
p "Waiting for one sec for diaog to show up"
sleep 1
end
My break in the if condition, when I find if the child is indeed the
child of my ie window, is not working as expected.
Is this correct ruby usage?
Can anyone suggest any other way to retry my waiting mechanism or the
child dialog to appear which is spawned by my IE browser.
Thanks and Regards,
Manish
_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general
irb(main):001:0> 10.times { |x| puts x; break if x == 3 }
0
1
2
3
=> nil
irb(main):002:0>
... your syntax should work.
jd
|
_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general