module Watir::Atoms
Constants
- ATOMS
Public Class Methods
load(function_name)
click to toggle source
# File lib/watir-webdriver/atoms.rb, line 6 def self.load(function_name) ATOMS[function_name] = File.read(File.expand_path("../atoms/#{function_name}.js", __FILE__)) end
Private Instance Methods
execute_atom(function_name, *arguments)
click to toggle source
# File lib/watir-webdriver/atoms.rb, line 18 def execute_atom(function_name, *arguments) script = "return (%s).apply(null, arguments)" % ATOMS.fetch(function_name) driver.execute_script(script, *arguments) end