When /^I set the max to "([^"]*)" minutes and progress to "([^"]*)" of the slider identified by "([^"]*)"$/ do |max, progress, label|

  on(DetailPage) do |screen|
    screen.send("slider_#{label}_max", max)
    screen.send("slider_#{label}_min", progress)
  end


The call screen.send("slider_#{label}_min", progress)

kept failing. The previous statement  "screen.send("slider_#{label}_max", max)" sets the max for the slider but that value wasn't being retained. So when the next statement executes, it tries to figure out how much it should move the slider based on the 'max' and 'progress' inputs. However max was always = 0 so when it tries to figure out the percentage to feed into the slider;s 'value:' method it throws an error because it tries to do progress / max. 

I got around this before by doing this in the step def. With this format I didn't need the class level variable:

slider = on(DetailPage).send("slider_#{label}_view")
slider.max_min max
slider.progress_min progress

Perhaps there's a better way to do this. Or perhaps the fact that I was trying to equate the slider with minutes is the problem and should be handled a different way.