Sha256: c929a13f91d807e84106bbb916ee4886e0c6d95ce98eed1b546ca48e06ed46ed
Contents?: true
Size: 577 Bytes
Versions: 10
Compression:
Stored size: 577 Bytes
Contents
require 'page_navigation' require 'gametel/waiter' module Gametel # # Module to facilitate create new gametel screen objects in # definitions. # module Navigation include PageNavigation, Gametel::Waiter # # create a new screen given a class name # def on(cls, &block) @current_screen = @current_page = cls.new waiting_for = "#{cls} to be active" wait_until(10, waiting_for) { @current_screen.active? } if @current_screen.respond_to?(:active?) block.call @current_screen if block @current_screen end end end
Version data entries
10 entries across 10 versions & 1 rubygems