Step by step Cordova calabash-ios automation

Step by step guide about how to integrate calabash-ios with Cordova in an automated way without opening Apple Xcode.

Note: First try steps given on https://github.com/calabash/calabash-ios.
If those steps aren’t working for you then try following steps. For me only manual steps given on above link worked.
Also this script doesn’t create separate target same as “calabsh-ios setup” command.

I also presume that you have already setup your cordova project and nodejs.
  1. sudo gem install calabash-cucumber If you get any error then try using following command
    sudo ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future gem install calabash-cucumber
    reference
  2. Go inside your Cordova project directory npm install xcode
    npm install fs-extra
    npm install underscore
  3. Download script “cordova-calabash-ios.js” from here and paste it inside your cordova project at www level (not inside www).
    (Note: This is very primitive script you can modify it according to your need. Let me know also know when you modify it. I will update your link here)
  4. Downlaod calabsh.framework.

    You may want to modify path to calabash.framework inside above downloaded script. I have added calabash.framework in https://github.com/bharatpatil/cordova-calabash-ios however it is good if you get updated version.
  5. cordova platform add ios
    if not already added.
  6. node cordova-calabash-ios.js
  7. cordova compile ios
  8. APP_BUNDLE_PATH=”platforms/ios/build/emulator/Your ProjectName.app” DEVICE_TARGET=’iPad – Simulator – iOS 7.0′ DEVICE=”ipad” POST_START_BREAK=0 calabash-ios console

    You should be seeing something like
    Running irb…
    irb(main):001:0>
  9. start_test_server_in_background

    This will attempt to start iOS simulator and your app. Wait until it starts simulator and your app.
  10. query(“webView”)

    In output of above command you should be able to see string containing “class” => “UIWebView”.
    Further you can go through https://github.com/calabash/calabash-ios/wiki/06-WebView-Support
If you have any issues please comment below.

Comments


I blog often and I seriously thank you for your information. This great article has really peaked my interest. I am going to take a note of your website and keep checking for new details about once a week. I opted in for your Feed too. google mail sign in
john kevin said…
Thanks a lot very much for the high quality and results-oriented help. I won’t think twice to endorse your blog post to anybody who wants and needs support about this area.
Best RPA Training in Bangalore

Kamal said…
Magnificent article.I got some valuable data about android.Thanks for sharing this awesome post.
Education | Article Submission sites | Technology
Maha said…
This comment has been removed by the author.
Vicky Ram said…
Your post is really very helpful. Easy to learn as you explain things precisely. Thank you so much.


iOS Training Institutes in Chennai

iOS Training Chennai
Vicky Ram said…
Your post is really very helpful. Easy to learn as you explain things precisely. Thank you so much.

iOS Course in Chennai

iOS Training Chennai
Harshavardhan said…
Thanks for sharing this informative and valuable post with us...
UI UX Design Courses in Chennai

Popular posts from this blog

How to get local time from UTC using Moment.JS

Measure the height of keyboard on PhoneGap app using jQuery