From c89ddabc9a205db7064420b7d27533f3336ac2dd Mon Sep 17 00:00:00 2001 From: Nathan Martins Date: Fri, 20 Apr 2018 17:51:14 -0300 Subject: [PATCH] Add monkeyPaws command line flag on test case An explanation to enable monkeyPaws with the command line flag adding code on testCase file --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index 57de0d2..ed88eca 100644 --- a/README.md +++ b/README.md @@ -167,6 +167,14 @@ but any time after you have a UIWindow will do. It also only instatiates the visualisation if a certain command line flag is passed, so that it can be enabled only for test runs.) +Using command line flags, If you want to enable MonkeyPaws on your +test case file you can add the following on yout testMonkey function: + +````swift + let application = XCUIApplication() +  application.launchArguments = ["--MonkeyPaws"] +```` + This call will swizzle some methods in UIApplication to capture UIEvents. If you would rather not do this, or if you already have a source of UIEvents, you can pass the following option to `init`