[wtr-general] Re: a method that will always executes.

2010-04-09 Thread Jarmo Pertman
Yup, you have a good memory. Anyway, it is a Kernel method and it's documentation is here: http://ruby-doc.org/core/classes/Kernel.html#M005932 On Apr 9, 1:12 am, Paul Rogers wrote: > at_exit do >    puts "Youve ended!" > end > > might be what you need ( check the syntax, long time since Ive used

[wtr-general] problems with focus (Firefox and IE8)

2010-04-09 Thread Schase
I am having some difficulty automating the autocomplete functionality of a textbox. The way I've done it before is to use type_keys and focus to trigger the behavior. I can set the text in the textbox without problem. If I try to set focus it appears nothing happens. However, I don't get any err

Re: [wtr-general] Re: synchronisation in ruby

2010-04-09 Thread windy
use Watir::Waiter.new(120,0.5).wait_until { do something here true... } is ok you can also see commonwatir/lib/watir/waiter.rb ( thx to orde he had tell us ) to understand Waiter class more clear. 在 Sat, 10 Apr 2010 01:14:56 +0800,orde 写道: Take a look at http://wtr.rubyforge.org/rdoc/1.6

[wtr-general] Re: synchronisation in ruby

2010-04-09 Thread orde
> there's an instance method in the Waiter class on line 36 that > should do the trick (note: untested): @@default_timeout = 60.0 I obviously meant class variable ;) On Apr 9, 10:14 am, orde wrote: > Take a look > athttp://wtr.rubyforge.org/rdoc/1.6.5/classes/Watir/Waiter.html#M000580. > > The

[wtr-general] Re: synchronisation in ruby

2010-04-09 Thread orde
Take a look at http://wtr.rubyforge.org/rdoc/1.6.5/classes/Watir/Waiter.html#M000580. The wait_until method is defined in commonwatir/lib/watir/waiter.rb, and there's an instance method in the Waiter class on line 36 that should do the trick (note: untested): @@default_timeout = 60.0 Hope that h

Re: [wtr-general] file download

2010-04-09 Thread Ethan
When the system is locked, windows doesn't send things like keypresses and button presses, as far as I've been able to determine. I know of no workaround for this, and would also be quite interested if anybody else knows one. On Fri, Apr 9, 2010 at 07:33, arihan sinha wrote: > Hello All, > > To h

Re: [wtr-general] Test the PDF through Ruby/Watiir

2010-04-09 Thread Yuping Zhong
I agree with Željko,@browser.title should work. Can you give us the URL so that we can help you? On Fri, Apr 9, 2010 at 7:56 PM, Željko Filipin < zeljko.fili...@wa-research.ch> wrote: > On Fri, Apr 9, 2010 at 1:51 PM, arihan sinha > wrote: > > I tried with $ie.title but its not working > > That

Re: [wtr-general] Test the PDF through Ruby/Watiir

2010-04-09 Thread Željko Filipin
On Fri, Apr 9, 2010 at 1:51 PM, arihan sinha wrote: > I tried with $ie.title but its not working That should work? "not working" is not enough data for me to help. You have to be me explicit. Željko -- Before posting, please read http://watir.com/support. In short: search before you ask, be n

Re: [wtr-general] Test the PDF through Ruby/Watiir

2010-04-09 Thread arihan sinha
Is there any way can take the title of the browser I tried with $ie.title but its not working Arihan On Fri, Apr 9, 2010 at 12:40 PM, Željko Filipin < zeljko.fili...@wa-research.ch> wrote: > On Fri, Apr 9, 2010 at 1:36 PM, arihan sinha > wrote: > > Could you please let me know how to test the

Re: [wtr-general] Test the PDF through Ruby/Watiir

2010-04-09 Thread Željko Filipin
On Fri, Apr 9, 2010 at 1:36 PM, arihan sinha wrote: > Could you please let me know how to test the pdf through ruby/watir. As far as I know, you can not test contents of pdf with Watir. There is probably another Ruby library that can do it. Željko -- watir.com - community manager pledgie.com/cam

[wtr-general] Test the PDF through Ruby/Watiir

2010-04-09 Thread arihan sinha
Hi, Could you please let me know how to test the pdf through ruby/watir. at present when we click any pdf link in our apps it gets opened in the browser in a separate window and we only verify the url. but can we verify the content as well or something else. Thanks Arihan -- Before posting, p

[wtr-general] file download

2010-04-09 Thread arihan sinha
Hello All, To handle the download prompt I am using the below code as save_dialog = WIN32OLE.new("AutoItX3.Control") // /// $ie.link(:text, "Download images").click_no_wait click_link_text_no_wait("click Link Download images", "Download images") save_dialog.WinW

Re: [wtr-general] synchronisation in ruby

2010-04-09 Thread arihan sinha
I am using wait_until and its working fine and it seems the default value is 60 secs. I mean it waits for 60 secs . If it doesnt find then status is fail. but if I want to change that to say 120 secs ( because in our apps few cases it takes more than 60 secs) then where i need to change. there mu

[wtr-general] Re: ajax and "unable to locate element"

2010-04-09 Thread sal
Thanks Wesley. That worked. On Apr 8, 10:08 pm, Wesley Chen wrote: > Please don't use the method: try again > The method below is really helpful. > Watir::Waiter.wait_until{$ff.div(:id, "addAlbumLink").exists?} > > Wesley. > For life, the easier, the better. > > On Fri, Apr 9, 2010 at 2:00 AM, Sa