[Wtr-general] not exactly watir but a ruby question

2006-08-11 Thread Manish Sapariya
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,

Re: [Wtr-general] not exactly watir but a ruby question

2006-08-11 Thread Dave Hoover
On 8/11/06, Manish Sapariya [EMAIL PROTECTED] wrote: Hi, How do break out of x.times loop. Here's one answer to your question... http://permalink.gmane.org/gmane.comp.lang.ruby.general/21817 ___ Wtr-general mailing list Wtr-general@rubyforge.org

Re: [Wtr-general] not exactly watir but a ruby question

2006-08-11 Thread Jeff Wood
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)

Re: [Wtr-general] Wtr-general Digest, Vol 33, Issue 19

2006-08-11 Thread Lonny Eachus
Manish, your break is working. But it is breaking out of your code block, not your "times" loop. {|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

Re: [Wtr-general] Wtr-general Digest, Vol 33, Issue 19

2006-08-11 Thread Jeff Wood
Lonny Eachus wrote: Manish, your break is working. But it is breaking out of your code block, not your times loop. {|win| puts #{win.getClassName}\t#{win.getWindowText} #p win.getWindowRect #p win if(win.getParent().hwnd == $ie.hwnd) then #p $ie.hwnd,

[Wtr-general] Digest headers

2006-08-11 Thread Charley Baker
Just as a general reminder to the list. If you're getting the digest version, be careful about sending back the subject header, digest headers are useless in categorizing and threading the emails. The original subject header you're responding to is in the digest, ideally copy/paste that in place

Re: [Wtr-general] Digest headers

2006-08-11 Thread Bret Pettichord
Charley Baker wrote: Just as a general reminder to the list. If you're getting the digest version, be careful about sending back the subject header, digest headers are useless in categorizing and threading the emails. The original subject header you're responding to is in the digest,

Re: [Wtr-general] ie.back

2006-08-11 Thread Bret Pettichord
ie.back is tested in navigate_test.rb, which works for me in trunk. Aidy, does this test work for you? Bret Charley Baker wrote: Hey Aidy, The back method does a straight call to ie's GoBack method, and according to the comments throws that exception only if for some reason it can't

[Wtr-general] Accessed Denied in Nested Frames

2006-08-11 Thread Lonny Eachus
I have to deal with some pages that contain nested frames, with source from different domains. Some are http and some https. In some cases, while trying to access these frames, I get "access denied": irb(main):044:0 ie.show_frames there are 4 frames frame index: 1 name: header frame

Re: [Wtr-general] Accessed Denied in Nested Frames

2006-08-11 Thread Attebery, Bill
...if possible more information about how to call arbitrary _javascript_ functions without firing an event from a page element. Here's oneway to call an arbitrary java function that works like a charm for me. window=$ie.ie.Document.parentWindowwindow.execScript('myjavafunction') To give

Re: [Wtr-general] Wtr-general Digest, Vol 33, Issue 19

2006-08-11 Thread Manish Sapariya
Thanks, It did work. Regards, Manish Jeff Wood wrote: Or, you could use a simple throw-catch pair. % irb irb(main):001:0 catch :done do irb(main):002:1* irb(main):003:1* 10.times do |x| irb(main):004:2* irb(main):005:2* [1,2,3].each do |y| irb(main):006:3*throw :done if