Giter Club home page Giter Club logo

publicautomation's Introduction

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 very 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.

publicautomation's People

Contributors

moredip avatar nicegraham avatar micke avatar alvarozauber avatar

Stargazers

Jacky avatar  avatar Mohammad Hanif avatar Anthony Mittaz avatar

Watchers

 avatar James Cloos avatar  avatar  avatar

publicautomation's Issues

Not working in IOS7

This framework does not work in the new IOS7 beta5 system. I have checked it with IPHONE5. The console will give an entitlement missing error.

I wonder if anyone can help with this?

Taps not working

Hi, I'm working with the TestingWithFrank fork of the repo to use it in Simon. I'm testing using GHUnit. The basic test is a GHUnit test that adds a UIView to the main window and then taps a button on that view.

However the tap never occurs. I've been looking into this and it could be the setup of the views. It appears that GHUnits interface creates the UIWindow, but never sets a rootViewController. The Simulator logs are error to the effect and debugging shows a nil value.

To perform the test, I add my test view as a subview of [UIApplication sharedApplication].keyWindow.

This has worked for testing up until this point.

PublicAutomation does not throw any error, and logs that it is tapping at what appears to be the correct location. But the button is never tapped.

Can you shed any light on this?

ciao
Derek

Tap not working on a UITableView

HI again,

I've got taps working on buttons just fine. I then ran some test code that tapped a UITableView using

[UIAutomationBridge tapView:view]

where view is a reference to the UITableView.

So far, I've not been able to get this to work. The UITableView does not fire it's tableView:didSelectRowAtIndexPath: method.

I presume you have PA working against tables. I've looked at the Frank code, but didn't spot anything that would indicate a table related work-around.

any ideas?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.