kif

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

十年热恋 提交于 2019-12-05 21:52:51
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 off when my KIF tests are done with it so my UI Tests can run? (Turning it off "manually" from the simulator's Settings app is not a solution—I'm looking for something I can call from code, set in the target or...?) It is not on by default. You must turn it on manually. bby I saw the following on Stew Gleadow's blog . You just need to change the line

KIF output: AX Exchange error: Error Domain=Accessibility Code=0 “Remote service does not respond to _accessibilityMachPort”

拈花ヽ惹草 提交于 2019-12-04 20:28:16
问题 When running KIF integration tests on device with iOS 8.1.3 I get lots of diagnostic messages of the following kind as console output: AX Exchange error: Error Domain=Accessibility Code=0 "Remote service does not respond to _accessibilityMachPort" UserInfo=0x1a55de50 {NSLocalizedDescription=Remote service does not respond to _accessibilityMachPort} This occurs during a call to waitForAccessibilityElement:view:withElementMatchingPredicate:tappable: . Otherwise testing works as expected, it

How to acknowledge system alerts automatically using KIF test framework?

佐手、 提交于 2019-12-04 04:03:09
I use KIF to test the UI for continuous integration. When the app is the first launch on a device (or iOS Simulator ), the system will show some alert views for security. How can KIF automatically acknowledge system alerts to prevent test from failure? The best way is to use [tester acknowledgeSystemAlert] . It will click the last button in the system alert :) For more information see this github thread. 来源: https://stackoverflow.com/questions/30028960/how-to-acknowledge-system-alerts-automatically-using-kif-test-framework

Can I check if a view exists on the screen with KIF?

人盡茶涼 提交于 2019-12-03 22:57:01
I am making a "before each" step and I am wanting to do steps to logout. I can't find anything about checking if an element exists before I try to touch it, then if it doesn't exist do something else. Is it possible to do this with KIF without having a reference to the object I want to check for? Something like: if([tester elementExistsWithAccesibilityLabel:@"backButton"]) { [tester tapViewWithAccessibilityLabel:@"backButton"]; } else { [tester tapViewwithAccesibilityLabel:@"Logout"]; } user2738882 I would suggest to try this approach: if([[[UIApplication sharedApplication] keyWindow]

How to mock location service using KIF-framework

南楼画角 提交于 2019-12-03 14:24:22
I use KIF framework ( http://github.com/kif-framework/KIF ) for UI Tests and I need to mock location service. The problem is location service starts BEFORE KIF method -beforeAll invoked. So it's too late to mock. Any suggestions would be appreciated. In my KIF target I have a BaseKIFSearchTestCase : KIFTestCase , where I overwrite CLLocationManager`s startUpdatingLocation in a category. Note that this is the only category overwrite I ever made as this is really not a good idea in general. but in a test target I can accept it. #import <CoreLocation/CoreLocation.h> #ifdef TARGET_IPHONE_SIMULATOR

Error loading XCTest, no suitable image found.

。_饼干妹妹 提交于 2019-12-03 08:22:02
问题 I have recently updated my Xcode and started having this error. 2014-11-03 15:03:54.222 App[13141:60b] Error loading /private/var/mobile/Applications/677127BD-5230-4D5F-B70E-AF728439D34B/tmp/AppTests.xctest/AppTests: dlopen(/private/var/mobile/Applications/677127BD-5230-4D5F-B70E-AF728439D34B/tmp/AppTests.xctest/AppTests, 262): no suitable image found. Did find: /private/var/mobile/Applications/677127BD-5230-4D5F-B70E-AF728439D34B/tmp/AppTests.xctest/AppTests: code signature invalid for '

Error loading XCTest, no suitable image found.

不打扰是莪最后的温柔 提交于 2019-12-02 22:03:53
I have recently updated my Xcode and started having this error. 2014-11-03 15:03:54.222 App[13141:60b] Error loading /private/var/mobile/Applications/677127BD-5230-4D5F-B70E-AF728439D34B/tmp/AppTests.xctest/AppTests: dlopen(/private/var/mobile/Applications/677127BD-5230-4D5F-B70E-AF728439D34B/tmp/AppTests.xctest/AppTests, 262): no suitable image found. Did find: /private/var/mobile/Applications/677127BD-5230-4D5F-B70E-AF728439D34B/tmp/AppTests.xctest/AppTests: code signature invalid for '/private/var/mobile/Applications/677127BD-5230-4D5F-B70E-AF728439D34B/tmp/AppTests.xctest/AppTests'

KIF: How to auto-run/stress test an iOS app to find the cause of a rare UI bug?

我与影子孤独终老i 提交于 2019-11-27 18:47:35
问题 Note: I added kif to the title just for search indexing puposes, considering that most of the answer turned out to discuss it I'm looking for something like selenium for iOS, basically a test-automation/unit test framework that can run a certain UI scenario many many times until it crashes, which would help me narrow down the cause of a UI bug that happens very rarely and randomly. (and by the way, I've NSLogged every single line of code of datasource/table interaction and spent hours