I want to set up some tests that use the Selenium Objective-C framework. This would enable me to hook into Appium whilst at the same time writing acceptance tests in the same language that I write the app in.
After downloading and adding the framework to my project, I added a test target, imported the framework and ran the tests. I got expected type errors around NSPoint
, NSSize
, etc. which are all contained in the library.
After some investigation I realised that Selenium Objective-C uses the Mac OS version of Foundation.framework
which contains the classes NSPoint
, NSSize
, etc. However, my app is an iOS app, so in Foundation.framework
I have CGPoint
, CGSize
, etc...
My question is, has anyone been able to use Selenium Objective-C? If so, how did you achieve this?
Environment: Xcode 5, iOS Simulator 7.0 iPad.
The reason you saw those issues is that the Selenium-Objective-C project used to for Mac only. In the Mac libraries NSPoint replaces CGPoint, CGSize -> NSSize
It wasn't all that much work to make it work for both, so I just checked in support for building for iOS.
https://github.com/appium/selenium-objective-c/commit/c27a5faf266719c87eda502718c90e350aba931e
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With