Module: ClickToChangeStateMixin

Included in:
Button, Link
Defined in:
lib/rutl/interface/elements/click_to_change_state_mixin.rb

Overview

Mix this in for things that change state when clicked. The only things that wouldn’t change state when clicked either shouldn’t be clicked or are just annoying.

Instance Method Summary collapse

Instance Method Details

#clickObject



7
8
9
10
11
12
13
14
15
16
17
# File 'lib/rutl/interface/elements/click_to_change_state_mixin.rb', line 7

def click
  # Screenshot before clicking. Is this really necessary?
  @context.interface.camera.screenshot
  this_css.click
  # returns the page it found
  result = @context.interface.wait_for_transition(@context.destinations)
  # And after clicking and going to new state. This seems more needed
  # because we want to see where we went.
  @context.interface.camera.screenshot
  result
end