Class: Webdrone::Browser

Inherits:
Object
  • Object
show all
Defined in:
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/browser.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(browser: 'chrome') ⇒ Browser

Returns a new instance of Browser.



5
6
7
# File 'lib/webdrone/browser.rb', line 5

def initialize(browser: 'chrome')
  @driver = Selenium::WebDriver.for browser.to_sym
end

Instance Attribute Details

#driver ⇒ Object

Returns the value of attribute driver.



3
4
5
# File 'lib/webdrone/browser.rb', line 3

def driver
  @driver
end

Instance Method Details

#clic ⇒ Object



3
4
5
# File 'lib/webdrone/clic.rb', line 3

def clic
  @clic ||= Clic.new self
end

#conf ⇒ Object



3
4
5
# File 'lib/webdrone/conf.rb', line 3

def conf
  @conf ||= Conf.new self
end

#ctxt ⇒ Object



3
4
5
# File 'lib/webdrone/ctxt.rb', line 3

def ctxt
  @ctxt ||= Ctxt.new self
end

#exec ⇒ Object



3
4
5
# File 'lib/webdrone/exec.rb', line 3

def exec
  @exec ||= Exec.new self
end

#find ⇒ Object



3
4
5
# File 'lib/webdrone/find.rb', line 3

def find
  @find ||= Find.new self
end

#form ⇒ Object



3
4
5
# File 'lib/webdrone/form.rb', line 3

def form
  @form ||= Form.new self
end

#mark ⇒ Object



3
4
5
# File 'lib/webdrone/mark.rb', line 3

def mark
  @mark ||= Mark.new self
end

#open ⇒ Object



3
4
5
# File 'lib/webdrone/open.rb', line 3

def open
  @open ||= Open.new self
end

#quit ⇒ Object



9
10
11
# File 'lib/webdrone/browser.rb', line 9

def quit
  @driver.quit
end

#shot ⇒ Object



3
4
5
# File 'lib/webdrone/shot.rb', line 3

def shot
  @shot ||= Shot.new self
end

#text ⇒ Object



3
4
5
# File 'lib/webdrone/text.rb', line 3

def text
  @text ||= Text.new self
end

#vrfy ⇒ Object



3
4
5
# File 'lib/webdrone/vrfy.rb', line 3

def vrfy
  @vrfy ||= Vrfy.new self
end

#wait ⇒ Object



3
4
5
# File 'lib/webdrone/wait.rb', line 3

def wait
  @wait ||= Wait.new self
end

#xlsx ⇒ Object



3
4
5
# File 'lib/webdrone/xlsx.rb', line 3

def xlsx
  @xlsx ||= Xlsx.new self
end