Sha256: 31dcd4968ffd3649ba9bfa7658b8507dc44c68aa6c0db9030d8de7244bd9b5db

Contents?: true

Size: 637 Bytes

Versions: 1

Compression:

Stored size: 637 Bytes

Contents

#
# 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.
#
module ClickToChangeStateMixin
  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
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rutl-0.3.0 lib/rutl/interface/elements/click_to_change_state_mixin.rb