Sha256: 4ebb76802f51d4982b2284833f859937c6103e29f741573b3e1471d3dee89bd9
Contents?: true
Size: 505 Bytes
Versions: 7
Compression:
Stored size: 505 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 :getAttribute load :getOuterHtml load :getParentElement 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
7 entries across 7 versions & 1 rubygems