Sha256: 2e9b270a59996aa74f069e13e8ae0a035c7f3af063875182e1851dec6de26593
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 :getOuterHtml load :getInnerHtml 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