-
Notifications
You must be signed in to change notification settings - Fork 237
Step Definition compendium
This page is intended to act as a place for useful Frank step definitions which aren't quite standard enough to add to the core frank steps. Please feel free to contribute your own useful codez.
(see this thread for details)
This works for Pete's team: When /^I use the keyboard to fill in the textfield marked "([^"])" with "([^"])"$/ do |text_field_mark, text_to_type| text_field_selector = "view marked:'#{text_field_mark}'" check_element_exists( text_field_selector ) touch( text_field_selector ) frankly_map( text_field_selector, 'setText:', text_to_type ) frankly_map( text_field_selector, 'endEditing:', true ) end
This works for Martin: When /^I use the keyboard to fill in the textfield marked "([^"])" with "([^"])"$/ do |text_field_mark, text_to_type| text_field_selector = "view marked:'#{text_field_mark}'" check_element_exists( text_field_selector ) frankly_map( text_field_selector, 'becomeFirstResponder' ) frankly_map( text_field_selector, 'setText:', text_to_type ) frankly_map( text_field_selector, 'endEditing:', true ) end