Hi, Pls ignore my previous comment - the clue was in the exception itself. Installed ffi :-)
Thanks. On Dec 22, 1:48 pm, Litha K <[email protected]> wrote: > Hi Jarmo, > > I am getting the following error when trying to go through your > example: I am on ruby 1.8.6 > > irb(main):003:0> window = RAutomation::Window.new :title => "File > Download" > Gem::LoadError: Unable to load FFI gem. Install it with: > gem install ffi -v 0.6.3 > from C:/Ruby186/lib/ruby/gems/1.8/gems/rautomation-0.3.0/lib/ > rautomation > /adapter/ffi.rb:4 > from C:/Ruby186/lib/ruby/gems/1.8/gems/rautomation-0.3.0/lib/ > rautomation > /window.rb:45:in `const_get' > from C:/Ruby186/lib/ruby/gems/1.8/gems/rautomation-0.3.0/lib/ > rautomation > /window.rb:45:in `initialize' > from (irb):3:in `new' > from (irb):3 > > Any thoughts? > > Cheers. > > On Dec 21, 3:43 pm, Jarmo Pertman <[email protected]> wrote: > > > Does the window itself stay open after clicking &Run? Currently there > > is a feature, which waits for the button to disappear to accept it as > > a successful click (there could be many things which might go wrong > > during the clicking, that's why there is this condition), until that > > it tries to click again and ends with a timeout. > > > I guess there should be a possibility to specify some other condition > > than default one when button is successfully clicked by a block or > > something. > > > It would be great if you'd create an issue > > athttps://github.com/jarmo/rautomation/issues > > > I haven't tried the following code, but maybe this (ugly solution) > > works for you temporarily: > > Thread.new {window3.button(:value => "&Run").click} > > window3.child(:title => /popup/). # do something > > > Jarmo Pertman > > ----- > > IT does really matter -http://www.itreallymatters.net > > > On Dec 19, 6:33 pm, Darryl Brown <[email protected]> wrote: > > > > Hi Jarmo, > > > > First I'll say - Great work on this gem!! > > > > I have been playing with this and it works very well. I did run into > > > one thing that I'm not sure on though. If I click in a dialogue that > > > launches a popup - "window3.button(:value => "&Run").click", the > > > script hangs and then times out. I don't see a "click_no_wait" method > > > in the Rautomation::Button class. Is this something that will be > > > considered. Perhaps a thread can be used to handle the popup - I'll > > > try that next. > > > > Below is the irb session. After the timeout, I attach to the popup and > > > finish the intended process . > > > > C:\>irb > > > irb(main):001:0> require "rautomation" > > > => true > > > irb(main):002:0> window1 = RAutomation::Window.new :title => /File > > > Download/ > > > => #<RAutomation::Window:0x28e8ea4 @adapter=:ffi, > > > @window=#<RAutomation::Adapter > > > ::Ffi::Window:0x2d7f5a8 @locators={:title=>/File Download/}>> > > > irb(main):003:0> window1.title > > > => "File Download - Security Warning" > > > irb(main):004:0> window1.button(:value => "&Save").click > > > => true > > > irb(main):005:0> window2 = RAutomation::Window.new :title => /Save/ > > > => #<RAutomation::Window:0x2d6ab30 @adapter=:ffi, > > > @window=#<RAutomation::Adapter > > > ::Ffi::Window:0x2d6aa90 @locators={:title=>/Save/}>> > > > irb(main):006:0> window2.title > > > => "Save As" > > > irb(main):007:0> window2.button(:value => "&Save").click > > > => true > > > irb(main):008:0> window3 = RAutomation::Window.new :title => / > > > Download/ > > > => #<RAutomation::Window:0x2d299c8 @adapter=:ffi, > > > @window=#<RAutomation::Adapter > > > ::Ffi::Window:0x2d2984c @locators={:title=>/Download/}>> > > > irb(main):009:0> window3.title > > > => "Download complete" > > > irb(main):010:0> window3.button(:value => "&Run").click > > > RAutomation::WaitHelper::TimeoutError: timed out after 60 seconds > > > from c:/ruby/lib/ruby/gems/1.8/gems/rautomation-0.3.0/lib/ > > > rautomation/wa > > > it_helper.rb:20:in `wait_until' > > > from c:/ruby/lib/ruby/gems/1.8/gems/rautomation-0.3.0/lib/ > > > rautomation/ad > > > apter/ffi/button.rb:25:in `click' > > > from c:/ruby/lib/ruby/gems/1.8/gems/rautomation-0.3.0/lib/ > > > rautomation/bu > > > tton.rb:15:in `click' > > > from (irb):10 > > > irb(main):011:0> window4 = RAutomation::Window.new :title => /Internet > > > Explorer/ > > > > => #<RAutomation::Window:0x2d6e0b4 @adapter=:ffi, > > > @window=#<RAutomation::Adapter > > > ::Ffi::Window:0x2d6dd1c @locators={:title=>/Internet Explorer/}>> > > > irb(main):012:0> window4.title > > > => "Internet Explorer - Security Warning" > > > irb(main):013:0> window4.button(:value => "&Run").click > > > => true > > > irb(main):014:0> > > > > Regards > > > Darryl > > > > On Dec 19, 7:25 am, Jarmo Pertman <[email protected]> wrote: > > > > > That would be great. Please don't forget to give any feedback after > > > > you've tried it. > > > > > Jarmo Pertman > > > > ----- > > > > IT does really matter -http://www.itreallymatters.net > > > > > On Dec 18, 11:27 pm, Arto Vuori <[email protected]> wrote: > > > > > > Appears promising! I'm about to extend my watir test suite to interact > > > > > with non-ie windows. I'll give your lib a try. > > > > > > --Arto > > > > > > On 18 joulu, 01:14, Jarmo <[email protected]> wrote: > > > > > > > I'm pretty sure that some of you already have noticed the library > > > > > > i've made > > > > > > to automate windows and their controls. I've now written a short > > > > > > blog post > > > > > > about it. > > > > > > >http://www.itreallymatters.net/post/2352350743/automating-windows-and... > > > > > > > If that thing seems to work well then what do you think if we'd > > > > > > replace > > > > > > AutoIt and win32-api in Watir with this eventually? I'd be happy to > > > > > > do that. > > > > > > > Jarmo -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. [email protected] http://groups.google.com/group/watir-general [email protected]
