Jump to content

AutoIt and Watir


Recommended Posts

Hi All,

Brand new to WATIR as of 3/31.

I have an AutoIt script(*.au3) that is controlling my desktop

application. I have a WATIR script(*.rb) that is controlling a web

page that is launched from the desktop application.

How to I interlace these two together?

Do I #include <*.au3> files in the Ruby script or do I require 'watir'

and 'win32ole' in the Ruby script? I haven't had much success other

then doing $autoit = WIN32OLE.new("AutoItX3.Control") and using some

simple $autoit.mouseclick here and there. Does this,

WIN32OLE.new("AutoItX3.Control"), give you all the functions you need

to control a desktop application like straight AutoIt does?

I.E.

#include <ScreenCapture.au3>

#include <WinAPI.au3>

#include <GuiToolbar.au3>

I need to be able to drive the application first via AutoIt and then

use Watir to drive the Web Application.

I'm confused.

Please help.

Thank you.

Cygnus

Cygnus

Link to comment
Share on other sites

Hello CygnusX1,

Ruby won't interlace with AutoIt using include statements, I'm afraid.

Also, AutoItX does not expose the exact same functionality as the "straight" one. You will be missing the UDFs as well as some of the built in support for TreeView, WinList, etc.

Just a thought, but if I were you I would research the available/missing functions in AutoItX ( via the Help files ) and see if I could still make use of it in my Ruby script. If I couldn't, then I would determine if the action taken against the client application is rigid enough that it could be encapsulated in a single compiled AutoIt script and run from within Ruby ( with logic to handle error codes ). finally, I would Google search for Win32 automation libraries for Ruby.

Hope this helps,

Zach...

* or use C# with WebAii and the UI Automation libraries in .NET 3.0. But AutoIT is so easy to work with; Sorry - that doesn't immediately solve your problem.

Edited by zfisherdrums
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...