Class: Webdrone::Mark
- Inherits:
-
Object
- Object
- Webdrone::Mark
- Defined in:
- lib/webdrone/mark.rb
Instance Attribute Summary collapse
-
#a0 ⇒ Object
Returns the value of attribute a0.
Instance Method Summary collapse
- #button(text, color: 'red', n: 1, all: false, visible: true) ⇒ Object
- #flash(item, color: 'red') ⇒ Object
- #id(id, color: 'red') ⇒ Object
-
#initialize(a0) ⇒ Mark
constructor
A new instance of Mark.
- #link(text, color: 'red', n: 1, all: false, visible: true) ⇒ Object
- #on(text, color: 'red', n: 1, all: false, visible: true) ⇒ Object
- #xpath(text, color: 'red', n: 1, all: false, visible: true) ⇒ Object
Constructor Details
#initialize(a0) ⇒ Mark
Returns a new instance of Mark.
11 12 13 |
# File 'lib/webdrone/mark.rb', line 11 def initialize(a0) @a0 = a0 end |
Instance Attribute Details
#a0 ⇒ Object
Returns the value of attribute a0.
9 10 11 |
# File 'lib/webdrone/mark.rb', line 9 def a0 @a0 end |
Instance Method Details
#button(text, color: 'red', n: 1, all: false, visible: true) ⇒ Object
23 24 25 |
# File 'lib/webdrone/mark.rb', line 23 def (text, color: 'red', n: 1, all: false, visible: true) flash @a0.find.(text, n: n, all: all, visible: visible), color: color end |
#flash(item, color: 'red') ⇒ Object
35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/webdrone/mark.rb', line 35 def flash(item, color: 'red') 3.times do border 'white', item sleep 0.1 border 'blue', item sleep 0.1 border color, item sleep 0.1 end item end |
#id(id, color: 'red') ⇒ Object
15 16 17 |
# File 'lib/webdrone/mark.rb', line 15 def id(id, color: 'red') flash @a0.find.id(id), color: color end |
#link(text, color: 'red', n: 1, all: false, visible: true) ⇒ Object
19 20 21 |
# File 'lib/webdrone/mark.rb', line 19 def link(text, color: 'red', n: 1, all: false, visible: true) flash @a0.find.link(text, n: n, all: all, visible: visible), color: color end |
#on(text, color: 'red', n: 1, all: false, visible: true) ⇒ Object
27 28 29 |
# File 'lib/webdrone/mark.rb', line 27 def on(text, color: 'red', n: 1, all: false, visible: true) flash @a0.find.on(text, n: n, all: all, visible: visible), color: color end |
#xpath(text, color: 'red', n: 1, all: false, visible: true) ⇒ Object
31 32 33 |
# File 'lib/webdrone/mark.rb', line 31 def xpath(text, color: 'red', n: 1, all: false, visible: true) flash @a0.find.xpath(text, n: n, all: all, visible: visible), color: color end |