Calabash 0.9.168

0.9.168 changelog

IMPORTANT requires a server update to 0.9.168

IMPORTANT The 'screenshot2' route has been deprecated - there is no replacement

Features

  • support for Xcode 5.1 iOS Simulators
  • improved scrolling for UICollectionViews
  • support for iPhone apps emulated on the iPad
  • ruby API for interacting with Keychain Services
  • more wait helpers
  • arm64 and x86_64 support
support for Xcode 5.1 iOS simulators

It is important that you read https://github.com/calabash/calabash-ios/wiki/A0-Xcode-51-Support wiki page.

We are deprecating the SDK_VERSION environmental variable in 0.9.168. To launch a specific form-factor/iOS combination, set the DEVICE_TARGET. Here are some examples:

# iPhone 3.5in iOS 6.1
$ DEVICE_TARGET='iPhone Retina (3.5-inch) - Simulator - iOS 6.1' cucumber 

# iPhone 4in iOS 7.1 64bit
$ DEVICE_TARGET='iPhone Retina (4-inch 64-bit) - Simulator - iOS 7.1' cucumber

# iPad retina iOS 7.0
$ DEVICE_TARGET='iPad Retina - Simulator - iOS 7.0' cucumber

IMPORTANT: It is imperative that you build your app for the simulator you are targeting. Before reporting issues, please triple check that you have built for the exact device / iOS pair you are testing.

known issues
  • You must manually enable Accessibility in each iOS Simulator (just like the old days).
  • Users are reporting ScriptAgent crashed dialogs in the Finder.
  • Cannot launch iOS 6.1 non-retina simulator.
  • Launching with sim_launcher is technically still supported, but it is not clear that will be supported in the future.
    • $ SDK_VERSION=6.1 cucumber
improved support for scroll to collection view cells

thanks @LiohAu

scroll_to_collection_view_item(item, section, opts={})
scroll_to_collection_view_item_with_mark(mark, opts={})

Please note that UICollectionViews are not available on iOS 5.

support for iPhone apps emulated on iPad in iOS 7

When testing an iPhone app on an iPad, the app must be scaled to 1x in order for calabash to translated touch coordinates correctly. To ensure your app is displayed at 1x, change your Before hook to look like this:

# support/01_launch.rb
Before do |scenario|
  @calabash_launcher = Calabash::Cucumber::Launcher.new
  unless @calabash_launcher.calabash_no_launch?
    @calabash_launcher.relaunch
    @calabash_launcher.calabash_notify(self)

    # ensures that emulated iphone apps are at 1x
    # this is a nop if the device is not an ipad
    ensure_ipad_emulation_1x
  end
...
end
calabash.framework now supports arm64 and x86_64

resolves issue #313 - thanks @daudt for suggesting this.

ruby API for Keychain interaction
  • +10 @jgallagher for his persistence and insights [PR #35] (https://github.com/calabash/calabash-ios-server/pull/35)
  • +1 @soffes for SSKeychain
improved API docs (yard + rdoc)

WIP - We are looking for help documenting the calabash-ios gem. Voice your opinion about rdoc vs. yard! Get involved!

Thanks to @TeresaP for pushing on this.

Touch the 'Documentation' link on the RubyGems project page: https://rubygems.org/gems/calabash-cucumber

keychain_clear
keychain_delete_password(service, account)
keychain_password(service, account)
keychain_set_password(service, account, password)
more wait helpers

thanks @jescriba

until_element_exists(uiquery, opts = {})
until_element_does_not_exist(uiquery, opts = {})
when_element_exists(uiquery, opts = {})

CORS headers

Calabash server now sets appropriate CORS http headers to allow separately deployed browser app to interact with server. This is intended for future tools to use.

Fixes

  • (issues https://github.com/calabash/calabash-ios/issues/185) - touch offset is incorrect for iphone app running on iOS 7 ipad simulator because app is always shown at 2x
  • (issues https://github.com/calabash/calabash-ios/issues/319) - iphone_5? returns false for iPhone 5S
  • (issues https://github.com/calabash/calabash-ios/issues/334) - uiatypestring + UITextView + text with newlines
  • (issues https://github.com/calabash/calabash-ios/issues/332) - whitespace in query crashes the app

Deprecated * NEW *

These functions, methods, or cucumber steps have been deprecated and will now generate warning messages.

To suppress deprecated warnings set ENV['CALABASH_NO_DEPRECATION']=1 (not recommend).

  • since 0.9.131 query_all - use query("view all") - see Query Syntax
  • since 0.9.145 set_text - use keyboard_enter_text or (sparingly) clear_text
  • since 0.9.151 When I clear "some text field" - no replacement
  • since 0.9.163 await_keyboard - use wait_for_keyboard
  • since 0.9.163 keyboard_enter_char second arg should_screenshot has been replaced by an options hash. Use the :should_screenshot key instead
  • since 0.9.163 send_uia_command - use uia("...javascript..", options) instead. This has not been formally deprecated (no warnings will be generated) yet, but it will be in a future version.
  • since 0.9.168 iphone_5? and Device::iphone_5? - use iphone_4in?
  • since 0.9.168 OS environmental variable has been deprecated - use DEVICE_TARGET instead
  • since 0.9.168 SDK_VERSION environment variable has been deprecated - use DEVICE_TARGET

Xamarin Workbook

If it's not already installed, install the Xamarin Workbooks app first. The workbook file should download automatically, but if it doesn't, just click to start the workbook download manually.