Skip to Main Content
Cucumber Recipes
book

Cucumber Recipes

by Ian Dees, Matt Wynne, Aslak Hellesoy
February 2013
Intermediate to advanced content levelIntermediate to advanced
272 pages
5h 45m
English
Pragmatic Bookshelf
Content preview from Cucumber Recipes
Recipe 26Test Windows GUIs with AutoIt

Problem

You want to test a Windows user interface from pure Ruby, rather than using a compiled .NET language.

Ingredients

  • AutoIt,[165] a freeware Windows automation suite

  • Ruby’s built-in Win32OLE libary[166] to control AutoIt

  • Unit Converter,[167] an example app to test

Solution

Windows power users have used AutoIt for years to perform little daily tasks around their systems. Among other things, AutoIt can launch programs, find windows, and click controls. In this recipe, we’ll write one test case for a simple Windows unit conversion program.

Setup

First, you’ll need to install AutoIt. Download and run the latest AutoIt Full Installation package from the official site.[168] This will register AutoIt’s ActiveX ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Cucumber Cookbook

Cucumber Cookbook

Shankar Garg
Basiswissen Softwaretest , 6th Edition

Basiswissen Softwaretest , 6th Edition

Andreas Spillner, Tilo Linz
React Cookbook

React Cookbook

David Griffiths, Dawn Griffiths

Publisher Resources

ISBN: 9781941222607Errata