Frank Mantek
Frank Mantek

Reputation: 11

UI XCTestCase on IO9 not playing back

I have an older project that I am trying to add XCTest cases for UI testing. I compile the project using iOS9 SDK, i use the iOS9 Simulator. I can record UI Tests in Xcode 7 just fine.

I can also create a sample Xcode 7/iO9 project, add UI tests, record one, and play it back, and it works fine.

But, in my important project, when I play back the tests, the simulator starts up, the application starts up, but no UI actions are executed. I can debug this, I can step over line like this:

[[[[[app childrenMatchingType:XCUIElementTypeWindow] elementBoundByIndex:0] childrenMatchingType:XCUIElementTypeOther] elementBoundByIndex:2] tap];

and I am not getting an error, but the tap is not happening.

I am a bit puzzled. I thought iOS9 SDK and iOS9 simulator are the only requirements. But i must be missing something simple, as no action I am trying to execute is actually happening. Like the connection to the accessibility layer is broken - but, on the other hand, I can record...

Would greatly appreciate a pointer on what I might be missing as a prerequisite for UI testing on an old project.

Upvotes: 1

Views: 97

Answers (1)

ali
ali

Reputation: 481

The problem is in the deployment target. Go to Project Target (Main Application Target) -> Build Settings -> Search "Deployment Target" for the Application UI test target change it to iOS 9.0. now it should work.

Upvotes: 1

Related Questions