zalando / SwiftMonkey

A framework for doing randomised UI testing of iOS apps
MIT License
1.95k stars 174 forks source link

Swift Compiler Error: Cannot call value of non-function type 'XCUIElement' #58

Closed kozubdenis closed 6 years ago

kozubdenis commented 6 years ago

Hi!

Tried to use your framework but faced with the issue while compiling. Could you help me please with it? Maybe I can add here some additional info you need to start investigate the issue? Just ping me. I use XCode Version 9.2 (9C40b) xcode error

wojciechczerski commented 6 years ago

Hey @kozubdenis ! It might be that your project is using Swift 3.2 and you're building with SwiftMonkey 2.0 which supports only Swift 4.0. If that's the case you can either:

kozubdenis commented 6 years ago

Update: we are using Swift 4.0 Thanks @wojciechczerski will check this case! By the way I was able to start the SwiftMonkey example and it worked. Strange that example works but framework doesn't in my app :)

One more question (I haven't investigated yet) but where can I find old SwiftMonkey 1.1.0? Thanks in advance!

wojciechczerski commented 6 years ago

The example must work ALWAYS! 😄

Regarding the older version of SwiftMonkey, if you're using CocoaPods then simply write in your Podfile:

pod "SwiftMonkey", "~> 1.1.0"
kozubdenis commented 6 years ago

Finally it works! The issue was with incorrect pod version written in Podfile :) Need to check why Paws don't work but it's next step. Will close the current ticket.