Hey all,
I am trying to write a step definition that will loop through all cells and swipe then touch delete them.
However I ran into a situation where frank seems to be attempting to tap the hidden delete buttons.
Does anyone else have experience in this regard?
My definition is:
Given /^There are no notes in the app$/ do
cells = frankly_map("tableViewCell label", "tag");
cells.each do | cell |
swipeIndDirection('tableViewCell label', 'right')
frankly_map( "tableViewCell label parent tableViewCell delete", "tag" )
step "I touch the Delete button"
end
end
When /^I touch the Delete button$/ do
wait_for_nothing_to_be_animating
back_button_selector = "view marked:'Delete'"
wait_for_nothing_to_be_animating
touch back_button_selector
wait_for_nothing_to_be_animating
end
def swipeIndDirection(uiquery, direction)
views_touched = frankly_map( uiquery, "swipeInDirection:","#{direction}" )
raise "could not find anything matching [#{uiquery}] to touch" if
views_touched.empty?
end