Generic approach to iOS UI Tests in Swift
Krzysztof Kempa

Hi @Krzysztof Kempa!

Thanks for sharing your experience with Swift / KIF and IOS automation tests.

I have a doubt about your tests. I think it's simple, but I don't know how to deal with that.

I'm trying to implement this model in my own project (it's a simple app for study swift and mobile test automation).

This is my Page.swift

protocol Page {
var test: BaseTest! {get set}
var pageIdentifier: String {get}
init(test: BaseTest)
extension Page {
init(test: BaseTest) {
self.test = test
func waitForView() {
tester.waitForView(withAccessibilityLabel: pageIdentifier)
var tester: KIFUITestActor {
return test.tester

When I try to run the tests, shows these errors:

  • "use of undeclared type BaseTest"
  • "use of undeclared type KIFUITestActor"

I'm very glad if you can help me with this.



One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.