Class: Chromate::MockElement
- Inherits:
-
Object
- Object
- Chromate::MockElement
- Defined in:
- lib/chromate.rb
Instance Attribute Summary collapse
-
#selector ⇒ Object
readonly
Returns the value of attribute selector.
Instance Method Summary collapse
- #click ⇒ Object
-
#initialize(selector) ⇒ MockElement
constructor
A new instance of MockElement.
- #type(text) ⇒ Object
Constructor Details
#initialize(selector) ⇒ MockElement
Returns a new instance of MockElement.
160 161 162 |
# File 'lib/chromate.rb', line 160 def initialize(selector) @selector = selector end |
Instance Attribute Details
#selector ⇒ Object (readonly)
Returns the value of attribute selector.
158 159 160 |
# File 'lib/chromate.rb', line 158 def selector @selector end |
Instance Method Details
#click ⇒ Object
164 165 166 167 |
# File 'lib/chromate.rb', line 164 def click puts "Clicked on #{@selector}" if ENV["DEBUG"] true end |
#type(text) ⇒ Object
169 170 171 172 |
# File 'lib/chromate.rb', line 169 def type(text) puts "Typed '#{text}' into #{@selector}" if ENV["DEBUG"] true end |