Calabash-android 0.5.2 released

928 views
Skip to first unread message

tobias....@xamarin.com

unread,
Aug 26, 2014, 10:07:17 AM8/26/14
to calabash...@googlegroups.com
Calabash-android 0.5.2 has now been released. This changelog has been copied from the Github repository.


Release notes for calabash-android 0.5.2

Add: Multi touch generic gestures. Using the Gestures module you can perform any multi touch gesture you want. For the most common scenarios, using the already defined methods will be sufficient. Examples:

  • touch("something", offset: {x: 10, y: -5})
  • touch("something", x: 0, y: 0) # Touch upper left
  • pan_left
  • pan("something", :up, time: 0.1) # This is a fast pan!
  • flick_up
  • pinch("WebView", :out)
  • touch("button", timeout: 30) # Wait up to 30 seconds for the button to appear

Change: All gestures now have a default timeout of 5 seconds to find the view before failing.

Change: Gestures will now query server-side. You should generally never save query results.

#bad
result
= query("button")
touch
(result)

#good
touch
("button")


Deprecate tap is not deprecated. Use tap_mark instead.

Add: method to press the user action button press_user_action_button. The user action button replaces the enter key and performs an appropriate action like going to the next field. If an argument is given, Calabash will perform the IME action specified. If not argument is given (recommended usage), Calabash will automatically extract what IME action to perform.

Note that Calabash due to security features in Android is unable to actually press the key on the IME. Instead Calabash will perform the same action that the IME was told by the application to show.

Usage:

keyboard_enter_text("Username")
press_user_action_button
keyboard_enter_text
("Password")
press_user_action_button


Add support for boxed parameters when invoking methods on a view. This enables the use of query("* id:'ratingBar'", setRating: x) on a rating bar and various other methods.

Add setdate and settime ruby methods. To remain backwards compatible, the methods can take a date- or timestring as their second parameter.

Usage:

set_date("DatePicker", 2014, 7, 1) # Set date to the 1st of July 2014 set_time("TimePicker", 16, 23) # Set the time to 16:23 (4:23 PM)

Add: generic press_key method to simulate keypresses on physical buttons. The following ruby wrappers have been added:

  • press_button(key)
  • press_down_button
  • press_up_button
  • press_left_button
  • press_right_button
  • press_enter_button

Change: Backdoor is now a route taking any amount of parameters of any type. It will try to apply the method on the application. If it is not defined in the application, it will try to apply the method on the current activity. The new usage is backwards compatible.

Fix: Scrolling now works properly for List Views as well as Scroll Views and Web Views.

Fix: scrolldown and scrollup not looking for List Views or Web Views to scroll. Previously the methods only looked for Scroll Views.

Fix: Look for zipalign in build-tools in not found in tools (changed by Android dev tools).

Fix: Weird console behaviour. Calabash-android console now behaves as its iOS counterpart and should work correctly for rvm users.

Fix: Save calabash settings to .calabash_settings not calabash_settings



Noffica

unread,
Aug 26, 2014, 7:46:39 PM8/26/14
to calabash...@googlegroups.com
Can the keyboard search button be triggered as well? e.g. press_button(search)

tobias....@xamarin.com

unread,
Aug 27, 2014, 4:39:17 AM8/27/14
to calabash...@googlegroups.com
If you are talking about the hardware button, which only a few devices have, the yes.

The virtual keyboard button, however, should be pressed using press_user_action_button. It should automatically detect what button should be visible on the keyboard. You can give it an argument telling it to tap a certain action type (press_user_action_button('search')), but that is not recommended.

Shyukri Shyukriev

unread,
Sep 5, 2014, 6:53:34 AM9/5/14
to calabash...@googlegroups.com

Shyukri Shyukriev

unread,
Sep 11, 2014, 2:19:11 AM9/11/14
to calabash...@googlegroups.com
Touch action too long?

Guys can anyone answer the issue on stackoverflow mentioned in previous post?
Reply all
Reply to author
Forward
0 new messages