Jack
Jack

Reputation: 21

Way to record and then play all UIEvents of UIApplication

Is there any way to record and then play all UIEvents of UIApplication?
Main idea is to record testing scenario and then play it and compare results.

I have managed to get all app events after subclassing UIApplication, but still I cant play them with any delay.

@interface MyApplication : UIApplication
@end

@implementation MyApplication

(void)sendEvent:(UIEvent*)event
{
    [super performSelector:@selector(sendEvent:) withObject:event afterDelay:0.0];  // nothing happens
}

Upvotes: 1

Views: 295

Answers (2)

Jack
Jack

Reputation: 21

So I found solution https://github.com/square/KIF contains UIView-KIFAdditions with method that provides opportunity to send a touch event

also this links may be usefull How to send a touch event to iPhone OS? Getting reference to the top-most view/window in iOS application

Upvotes: 1

Anton
Anton

Reputation: 2847

You can make test scenario using:

Cucumber

KIF

or something else test frameworks.

Upvotes: 2

Related Questions