0

So I am trying to scroll and click each cell on table view. I have one section and 13 rows I use following code

Then /^I Traverse TableView$/ do
    each_cell(:animate => true) do |row, sec|
        txt = query("tableViewCell indexPath:#{row},#{sec} label", :text).first
        touch("tableViewCell index:#{row}")
        sleep(STEP_PAUSE)
        touch "view marked: 'Recipe Book'" #Back button titled "Receipe Book"
        sleep(STEP_PAUSE)
    end
end

Problem is it skips rows in between and as a result at the end the "i" is missed matched and throws error.

Any idea how I can fix this intermittent row skips?

-katchdoze

katch
  • 820
  • 1
  • 7
  • 24
  • Could you add something about the UI you are testing? As I understand it you have a list, when you click a cell a new screen is opened and from there you have to use back to get back to list. How about list when you go back does it move or stay in place? A few screenshots might help. – Lasse Jan 11 '15 at 18:58
  • Here is the sample code that I downloaded for tableview [link](http://www.appcoda.com/use-storyboards-to-build-navigation-controller-and-table-view/) – katch Jan 14 '15 at 07:23
  • Okay, well it looks okay to me. I have never used that specific syntax though. Have you tried adding some debug "puts" to see where it goes wrong? That might shed some light on it. You can use puts "here is some text #{variable}". – Lasse Jan 16 '15 at 10:03

0 Answers0