Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
A set of Objective-C helpers that assist in querying a iOS/OS X UI.
Objective-C Ruby C
Tree: 5fd97e2c4c

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
Classes
.gitignore
FTOnion.podspec
README.md

README.md

The double-dollar sign macro

Returns an array of UI elements of the given class. Starts traversing from the key UIWindow instance.

it(@"has a segmented control that switches the type of task shown", ^{
  UISegmentedControl *tabs = [$$(UISegmentedControl) lastObject];
  [[[tabs titleForSegmentAtIndex:0] should] equal:@"Upcoming"];
  [[[tabs titleForSegmentAtIndex:1] should] equal:@"Completed"];
  [[[tabs titleForSegmentAtIndex:2] should] equal:@"Assigned"];
});

The single-dollar sign macro

Returns the UI element whose accessibility label matches the given string. Starts traversing from the key UIWindow instance.

This needs ‘accessibility’ enabled in order to function.

it(@"shows the `completed' tab", ^{
  UIView *tab = $(@"Completed"); // instance of UISegment
  [[theValue(tab.hidden) should] equal:theValue(NO)];
});

-[UIView tap]

Sends a touch event to the UI element, simulating a tap.

it(@"shows the `completed' tasks", ^{
  [$(@"Completed") tap];
  [[controller.tasks should] equal:completedTasks];
});
Something went wrong with that request. Please try again.