Easy extensibility - with small scripting effort it's possible to add
support for not yet supported platforms or technologies

USAGE

require"rautomation"window=RAutomation::Window.new(:title=>/part of the title/i)window.exists?# => truewindow.title# => "blah blah part Of the title blah"window.text# => "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec ultricies..."window.text_field(:class=>"Edit",:index=>0).set"hello, world!"button=window.button(:value=>"&Save")button.exists?# => truebutton.clickall_windows=RAutomation::Window.windowsall_windows.each{|window|putswindow.hwnd}window=RAutomation::Window.new(:title=>/part of the title/i)windows=window.windowsputswindows.size# => 2windows.map{|window|window.title}# => ["part of the title 1", "part of the title 2"]window.windows(:title=>/part of other title/i)# => all windows with matching specified titlewindow.buttons.each{|button|putsbutton.value}window.buttons(:value=>/some value/i).each{|button|putsbutton.value}window2=RAutomation::Window.new(:title=>"Other Title",:adapter=>:autoit)# use AutoIt adapter# use adapter's (in this case AutoIt's) internal methods not part of the public API directlywindow2.WinClose("[TITLE:Other Title]")

Check out the documentation for other possible usages!

INSTALL

Windows

gem install rautomation

create script and run it

Available adapters:

:ffi - uses Windows API directly with FFI (default)

:autoit - uses AutoIt for automation

When using AutoIt adapter: You might need administrative privileges if
running for the first time and you haven't installed AutoIt before!

Linux

Feel yourself at home on Linux and know how to automate windows and their
controls? I would be happy if you'd contact me about that matter - or
even better, follow the instructions at “How to create a new adapter?”

OS X

Feel yourself at home on OS X and know how to automate windows and their
controls? I would be happy if you'd contact me about that matter - or
even better, follow the instructions at “How to create a new adapter?”

Others

Feel yourself at home on some operating system not listed in here and know
how to automate windows and their controls? Does Ruby also work on that
operating system? I would be happy if you'd contact me about that
matter - or even better, follow the instructions at “How to create a new
adapter?”

How to create a new adapter?

Fork the project.

Create entry point file to lib/rautomation/adapter which should load all
adapter specific files.

Add `autoload` statement into lib/rautomation/adapter/helper.rb for that
file.

Create a directory for your adapter's specific code into
lib/rautomation/adapter

Copy button.rb, text_field.rb and window.rb from some of the existing
adapter's directory.

Add spec data for your adapter into spec/spec_helper DATA constant.

Use environment variable RAUTOMATION_ADAPTER to point to that
adapter.

Start coding and spec-ing until as much of possible of the public API is
satisfied.