Class: Webdrone::Clic

Inherits:
Object
  • Object
show all
Defined in:
lib/webdrone/clic.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(a0) ⇒ Clic

Returns a new instance of Clic.



11
12
13
# File 'lib/webdrone/clic.rb', line 11

def initialize(a0)
  @a0 = a0
end

Instance Attribute Details

#a0Object

Returns the value of attribute a0.



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

def a0
  @a0
end

Instance Method Details

#button(text, n: 1, all: false, visible: true) ⇒ Object



33
34
35
36
37
# File 'lib/webdrone/clic.rb', line 33

def button(text, n: 1, all: false, visible: true)
  @a0.find.button(text, n: n, all: all, visible: visible).click
rescue => exception
  Webdrone.report_error(@a0, exception, Kernel.caller_locations)
end

#css(text, n: 1, all: false, visible: true) ⇒ Object



21
22
23
24
25
# File 'lib/webdrone/clic.rb', line 21

def css(text, n: 1, all: false, visible: true)
  @a0.find.css(text, n: n, all: all, visible: visible).click
rescue => exception
  Webdrone.report_error(@a0, exception, Kernel.caller_locations)
end

#id(text) ⇒ Object



15
16
17
18
19
# File 'lib/webdrone/clic.rb', line 15

def id(text)
  @a0.find.id(text).click
rescue => exception
  Webdrone.report_error(@a0, exception, Kernel.caller_locations)
end


27
28
29
30
31
# File 'lib/webdrone/clic.rb', line 27

def link(text, n: 1, all: false, visible: true)
  @a0.find.link(text, n: n, all: all, visible: visible).click
rescue => exception
  Webdrone.report_error(@a0, exception, Kernel.caller_locations)
end

#on(text, n: 1, all: false, visible: true) ⇒ Object



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

def on(text, n: 1, all: false, visible: true)
  @a0.find.on(text, n: n, all: all, visible: visible).click
rescue => exception
  Webdrone.report_error(@a0, exception, Kernel.caller_locations)
end

#option(text, n: 1, all: false, visible: true) ⇒ Object



45
46
47
48
49
# File 'lib/webdrone/clic.rb', line 45

def option(text, n: 1, all: false, visible: true)
  @a0.find.option(text, n: n, all: all, visible: visible).click
rescue => exception
  Webdrone.report_error(@a0, exception, Kernel.caller_locations)
end

#xpath(text, n: 1, all: false, visible: true) ⇒ Object



51
52
53
54
55
# File 'lib/webdrone/clic.rb', line 51

def xpath(text, n: 1, all: false, visible: true)
  @a0.find.xpath(text, n: n, all: all, visible: visible).click
rescue => exception
  Webdrone.report_error(@a0, exception, Kernel.caller_locations)
end