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 37Drive a Mac GUI Using AppleScript and System Events

Problem

You want to write Cucumber tests that exercise a Mac application through its user interface.

Ingredients

  • System Events,[244] an Apple-provided API for simulating GUI events

  • rb-appscript,[245] a bridge between Ruby and AppleScript

  • Command-Line Tools for Xcode[246] to compile rb-appscript

Solution

Since the 1980s, Mac users have customized and automated their systems using the built-in AppleScript environment. Initially, this technology relied on software vendors to make their apps’ features available in AppleScript. Now, users can perform basic GUI automation of just about any program through an AppleScript API known as System Events.

In this recipe, we’re going to write ...

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