Method: Rtml::Test::Screen#choices

Defined in:
lib/rtml/test/screen.rb

#choicesObject

Returns an array of URIs that can be chosen by the user at this time, or an empty array if none can be chosen. This inversely coincides with #next_screen in that choices are only available if #next_screen returns an empty array, just as #next_screen will only return an empty array if choices are available.



89
90
91
92
93
94
95
96
97
# File 'lib/rtml/test/screen.rb', line 89

def choices
  choices = (@screen / "a").collect do |a|
    a['href']
  end
  ((@screen / "variant") || []).each do |variant|
    choices << variant['uri'] if variant['key']
  end
  choices
end