Module: Webdrone

Defined in:
lib/webdrone.rb,
lib/webdrone/clic.rb,
lib/webdrone/conf.rb,
lib/webdrone/ctxt.rb,
lib/webdrone/exec.rb,
lib/webdrone/find.rb,
lib/webdrone/form.rb,
lib/webdrone/mark.rb,
lib/webdrone/open.rb,
lib/webdrone/shot.rb,
lib/webdrone/text.rb,
lib/webdrone/vrfy.rb,
lib/webdrone/wait.rb,
lib/webdrone/xlsx.rb,
lib/webdrone/error.rb,
lib/webdrone/browser.rb,
lib/webdrone/version.rb

Defined Under Namespace

Classes: Browser, Clic, Conf, Ctxt, Exec, Find, Form, Mark, Open, Shot, Text, Vrfy, Wait, WebdroneError, Xlsx

Constant Summary collapse

VERSION =
"0.8.2"

Class Method Summary collapse

Class Method Details

.create(*args) ⇒ Object



26
27
28
29
30
31
32
33
34
35
36
37
# File 'lib/webdrone.rb', line 26

def self.create(*args)
  a0 = Webdrone::Browser.new *args
  if block_given?
    begin
      yield a0
    ensure
      a0.quit
    end
  else
    a0
  end
end

.irb_console(binding = nil) ⇒ Object



39
40
41
42
43
# File 'lib/webdrone.rb', line 39

def self.irb_console(binding = nil)
  return if IRB.CurrentContext
  binding = Kernel.binding.of_caller(1) if binding == nil
  IRB.start_session(binding)
end

.report_error(a0, exception, caller_locations) ⇒ Object

Raises:



106
107
108
109
110
111
112
# File 'lib/webdrone/error.rb', line 106

def self.report_error(a0, exception, caller_locations)
  if exception.class == WebdroneError
    raise exception
  end

  raise WebdroneError.new(exception.message, exception, a0, caller_locations)
end