Sha256: 53d3a386207ab079a32b1aa68aef4769381893d899300784093e09da36d66837
Contents?: true
Size: 851 Bytes
Versions: 1
Compression:
Stored size: 851 Bytes
Contents
module RUTL module Element # # 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 # click does: # * Screenshot before clicking. Is this really necessary? # * Click. # * Waits for transition to post-click state. (Polls until one reached.) # * Screenshot again after the transition. This one is definitely needed. # * Returns the state we transitioned to. def click @context.interface.camera.screenshot @context.find_element.click result = @context.interface.wait_for_transition(@context.destinations) @context.interface.camera.screenshot result end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
rutl-0.8.0 | lib/rutl/element/click_to_change_state_mixin.rb |