Skip to content

User Contributed Steps and Tips

Joshua Moody edited this page Jun 17, 2015 · 1 revision

Contributed Steps

Do you have step that you think the community should know about?

Add it here!

deprecated contributions

A big thanks goes out to previous contributions that no longer work because of changes in the ruby API and/or changes to UIKit

  • Bruno Scheele's Keyboard step

TableView actions

contributed by Moncef Belyamani

Buttons

contributed by Brad Taylor
Then /^I should see "([^\"]*)" (un)?checked$/ do |label, un|
  sel = query("button marked:'#{label}'", :isSelected)[0]
  if un.nil?
    screenshot_and_raise "Expected check button checked" if sel == '0'
  else
    screenshot_and_raise "Expected check button unchecked" if sel == '1'
  end
end

Views

contributed by Jens Kohl

Personally I use this step a lot while prototyping my scenarios. But consider writing a more specific step definition, when you've grown a feeling for what your scenarios should look like.

Then /^I (?:press|touch) (?:the) (\d+)(?:st|nd|rd|th) "([^\"]+)" view$/ do |index, class_name|
  touch("view:'#{class_name}' index:#{index}")
  sleep(STEP_PAUSE)
end

Date Pickers

Update calabash-ios supports interactions with UIDatePickers

picker_set_date_time

Google Group Discussions - thanks to everyone who is participating in these on-going discussions.

Sliders

Update calabash-ios supports interactions with UISliders

slider_set_value(uiquery, value, options={})

http://calabashapi.xamarin.com/ios/Calabash/Cucumber/Core.html#slider_set_value-instance_method

Other

Facebook safari login - contributed by Satoridigital
briar - extends calabash-ios and provides tools to improve your workflow
Clone this wiki locally