-
Notifications
You must be signed in to change notification settings - Fork 369
User Contributed Steps and Tips
Do you have step that you think the community should know about?
Add it here!
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
contributed by Moncef Belyamani
- Swipe to delete all cells in a Table View - contains references to outdated UIKit elements
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
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
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.
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