Questions tagged [kif-framework]

KIF ("Keep It Functional") is a library originally created by Square to help testing on Apple's iOS platform. It uses the system accessibility features to simulate a user's interactions with an app from within an XCTest suite.

KIF ("Keep It Functional") is a library originally created by Square to help testing on Apple's iOS platform. It uses the system accessibility features to simulate a user's interactions with an app from within an XCTest suite. For more information see the blog post or the GitHub repository.

82 questions
30
votes
0 answers

Why does KIF UIView:dragFromPoint:toPoint not result in touchesEnded:withEvent being called on my view?

This question is about the iOS acceptance testing framework KIF. I have a test step which uses the KIF extension to UIView dragFromPoint:toPoint. I have a custom view class which implements touchesBegan/touchesMoved/touchesEnded/touchesCancelled.…
kennbrodhagen
  • 4,258
  • 2
  • 26
  • 21
22
votes
13 answers

How do I set the accessibility label for a particular segment of a UISegmentedControl?

We use KIF for our functional testing, and it uses the accessibility label of elements to determine where to send events. I'm currently trying to test the behaviour of a UISegmentedControl, but in order to do so I need to set different…
Simon
  • 25,468
  • 44
  • 152
  • 266
8
votes
4 answers

Simulate orientation changes in iOS for testing purposes

I would like to test my app's ability to handle orientation changes (portrait/landscape). I'm currently using KIF and as far as I know, it cannot do this. Is there a way to simulate the rotation events programmatically for the iOS simulator? I don't…
Tomas Andrle
  • 13,132
  • 15
  • 75
  • 92
6
votes
1 answer

How do I make a custom UIView accessible?

I have a custom UIView subclass that contains a grid of cells, each of which are also custom UIView subclasses. I'm interested in using the Keep It Functional test framework, which requires that every view have an acccessibilityLabel. How do I…
Bill
  • 44,502
  • 24
  • 122
  • 213
6
votes
3 answers

Get UIVIew from accessibilityLabel for KIF automation

I am using the KIF Framework for functional UI testing. Let's say I am on a current iPad screen where many views (labels, buttons, textfields etc) have unique accessibility labels assigned. If I have the accessibilityLabel string handy, can I get a…
Paresh Masani
  • 7,474
  • 12
  • 73
  • 139
5
votes
1 answer

KIF: is there a way to get all the accessibility labels in a current screen?

I am using KIF for testing an iOS app, and I would like to know if there is a way to get all the accessibility labels in a current screen. I would like to get an array of strings where each element is the accessibility labels that this screen has.
lmiguelvargasf
  • 63,191
  • 45
  • 217
  • 228
5
votes
1 answer

KIF 2.0 access element in UIWebview

Can somebody tell me how to access an input field in a uiwebview in KIF 2.0? Unfortunately I can't find anything on KIF Framework Github, neither in the documentation nor in the examples. I tried to access the input field via its id but this doesn't…
palme
  • 2,499
  • 2
  • 21
  • 38
5
votes
4 answers

Linker error comes while running as well as testing the Xcode workspace after updating KIF framework via cocoapods

I have an Xcode workspace in which I have updated to KIF 2.0(pod update via terminal & pod 'KIF' in the podfile) after that I have configured the workspace as per the instructions provided in…
Hari
  • 123
  • 1
  • 12
4
votes
1 answer

Samples for implementing KIF

Can you please upload some sample application and code to get started? This would really help in exploring and adding more to the on-going project.
4
votes
1 answer

Xcode 6.3.2 runs all the tests instead of just the one I selected (KIF)

This question is similar to: XCode run all the tests (even the disabled ones) But different in that I'm not disabling any tests. I'm just pressing the single test icon next to a test function or test case: A friend of mine is running KIF in a Swift…
Albert Bori
  • 9,832
  • 10
  • 51
  • 78
4
votes
2 answers

Any ideas on how to implement pull to refresh with KIF Tests?

This is pretty open-ended. Does anyone have an idea as to how to test pull-to-refresh functionality in KIF Tests?
Neeraj
  • 8,408
  • 8
  • 41
  • 69
4
votes
2 answers

How to automatically click OK in response to " would like to use your current location" while testing with KIF?

I'm using KIF for GUI testing, and it seems we have no way in Simulator to automatically click the OK button in the would like to use your current location alert that appears when the app is run for the first time. Is there a way to configure…
Asking One
  • 161
  • 4
3
votes
2 answers

KIF Framework for iOS: Can it simulate touch-and-hold gesture?

How do I simulate a touch-and-hold step on a view using the KIF-framework for iOS
memmons
  • 40,222
  • 21
  • 149
  • 183
3
votes
0 answers

How can I use both KIF and XCTest in one test case class?

I'm trying to adapt this solution for resetting application after each test in my KIF test class. So I modified main.m file and added XCUIApplication *app = [[XCUIApplication alloc] init]; app.launchArguments = @[@"--reset-container"]; [app…
N13
  • 91
  • 7
3
votes
2 answers

How do I turn off the Accessibility Inspector in the iOS 9 simulator?

The accessibility inspector is turned on by my KIF tests (apparently it's necessary for KIF to work.) Problem is, its window occludes controls some subsequent UI tests need to tap on and those tests fail. How can I turn the Accessibility Inspector…
Robert Atkins
  • 23,528
  • 15
  • 68
  • 97
1
2 3 4 5 6