Method: PageObject::Accessors#b
- Defined in:
- lib/page-object/accessors.rb
#b(name, identifier = {:index => 0}, &block) ⇒ Object
adds three methods - one to retrieve the text of a b element, another to retrieve a b element, and another to check for it’s existence.
1170 1171 1172 1173 1174 1175 1176 |
# File 'lib/page-object/accessors.rb', line 1170 def b(name, identifier={:index => 0}, &block) standard_methods(name, identifier,'b_for', &block) define_method(name) do return platform.b_text_for identifier.clone unless block_given? self.send("#{name}_element").text end end |