Sha256: edc4c6d3f63c904966af1f9bbde8f931b12631b7a1e6357272cf24b6cfd78e55

Contents?: true

Size: 478 Bytes

Versions: 18

Compression:

Stored size: 478 Bytes

Contents

module Watir
  module Atoms

    ATOMS = {}

    def self.load(function_name)
      ATOMS[function_name] = File.read(File.expand_path("../atoms/#{function_name}.js", __FILE__))
    end

    load :fireEvent
    load :getOuterHtml
    load :getInnerHtml

    private

    def execute_atom(function_name, *arguments)
      script = "return (%s).apply(null, arguments)" % ATOMS.fetch(function_name)
      driver.execute_script(script, *arguments)
    end

  end # Atoms
end # Watir

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
watir-6.7.3 lib/watir/atoms.rb
watir-6.7.2 lib/watir/atoms.rb
watir-6.7.1 lib/watir/atoms.rb
watir-6.7.0 lib/watir/atoms.rb
watir-6.6.3 lib/watir/atoms.rb
watir-6.6.2 lib/watir/atoms.rb
watir-6.6.1 lib/watir/atoms.rb
watir-6.6.0 lib/watir/atoms.rb
watir-6.5.0 lib/watir/atoms.rb
watir-6.4.3 lib/watir/atoms.rb
watir-6.4.2 lib/watir/atoms.rb
watir-6.4.1 lib/watir/atoms.rb
watir-6.4.0 lib/watir/atoms.rb
watir-6.4.0.rc2 lib/watir/atoms.rb
watir-6.4.0.rc1 lib/watir/atoms.rb
watir-6.3.0 lib/watir/atoms.rb
watir-6.2.1 lib/watir/atoms.rb
watir-6.2.0 lib/watir/atoms.rb