Skip to content
a nice Objective C library for simulating user interactions
Objective-C Ruby C
Find file
Pull request Compare This branch is 30 commits ahead of moredip:master.
Latest commit 3c76dc4 Jan 31, 2015 @moredip moredip Merge pull request #11 from CMTaylor/FixForIssue43
Fix for Issue #43 (perhaps incomplete).

README.md

PublicAutomation

PublicAutomation is a wrapper around the private framework used by Apple's UIAutomation tools.

PublicAutomation exposes a nice Objective C API for simulating user interactions (touches, swipes, etc.).

PublicAutomation is young, but already exposes enough functionality to write test automation scripts for most apps.

PublicAutomation is best used together with a view selection library (like Shelley or Igor) and a nice high-level testing framework (like Cucumber). You should use Frank for that. It ties PublicAutomation and these other tools together for you in a pretty bow.

Show me code

Tap

[UIAutomationBridge tapView:myView];
// or
[UIAutomationBridge tapView:myView atPoint:CGPointMake(12.0,34.0)];

Swipe

[UIAutomationBridge swipeView:myView inDirection:PADirectionLeft];

Type

[UIAutomationBridge tapView:myTextField];
if( [UIAutomationBridge checkForKeyboard] ){
  [UIAutomationBridge typeIntoKeyboard:@"ZOMG I am typing. 123 and $%^ work too!"];
}

Credits

PublicAutomation uses a modified version of KIF's awesome keyboard-typing code. Thanks guys!

License

Copyright 2012 ThoughtWorks, Inc.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Something went wrong with that request. Please try again.