Sha256: 4b85dfb04d87084bd1abafced6f35ad462137724494f72183c5bda2748a21762

Contents?: true

Size: 875 Bytes

Versions: 12

Compression:

Stored size: 875 Bytes

Contents

# frozen_string_literal: true

require 'forwardable'
module PageMagic
  # module SessionMethods - contains methods for interacting with the {Session}
  module SessionMethods
    extend Forwardable

    # @!method execute_script(script)
    #  execute javascript on the browser
    #  @param [String] script the script to be executed
    #  @return [Object] object returned by the {Session#execute_script}
    def_delegator :session, :execute_script

    # @!method page
    #  returns the currently active page object
    #  @see Session#current_page
    def_delegator :session, :current_page, :page

    # @!method path
    #  returns the current path
    #  @see Session#current_path
    def_delegator :session, :current_path, :path

    # @!method url
    #  returns the current url
    #  @see Session#current_url
    def_delegator :session, :current_url, :url
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
page_magic-2.0.13 lib/page_magic/session_methods.rb
page_magic-2.0.12 lib/page_magic/session_methods.rb
page_magic-2.0.11 lib/page_magic/session_methods.rb
page_magic-2.0.10 lib/page_magic/session_methods.rb
page_magic-2.0.9 lib/page_magic/session_methods.rb
page_magic-2.0.6 lib/page_magic/session_methods.rb
page_magic-2.0.5 lib/page_magic/session_methods.rb
page_magic-2.0.4 lib/page_magic/session_methods.rb
page_magic-2.0.3 lib/page_magic/session_methods.rb
page_magic-2.0.2 lib/page_magic/session_methods.rb
page_magic-2.0.1 lib/page_magic/session_methods.rb
page_magic-2.0.0 lib/page_magic/session_methods.rb