Sha256: 507626dabd8ae349b3f083e424fa3b0af9e45b136f040988c1c80e455c364395

Contents?: true

Size: 542 Bytes

Versions: 3

Compression:

Stored size: 542 Bytes

Contents

# encoding: utf-8
module Watir
  module Container
    class << self
      def add(method, &blk)
        define_method(method, &blk)
      end
    end

    include XpathSupport

    private

    def browserbot(function_name, *arguments)
      script = browserbot_script + "return browserbot.#{function_name}.apply(browserbot, arguments);"
      driver.execute_script(script, *arguments)
    end

    def browserbot_script
      @browserbot_script ||= File.read("#{File.dirname(__FILE__)}/browserbot.js")
    end

  end # Container
end # Watir

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
watir-webdriver-0.0.1.dev3 lib/watir-webdriver/container.rb
watir-webdriver-0.0.1.dev2 lib/watir-webdriver/container.rb
watir-webdriver-0.0.1.dev lib/watir-webdriver/container.rb