Class: AngularWebdriver::ProtractorElement
- Inherits:
-
Object
- Object
- AngularWebdriver::ProtractorElement
- Defined in:
- lib/angular_webdriver/protractor/protractor_element.rb
Instance Attribute Summary collapse
-
#watir ⇒ Object
readonly
Returns the value of attribute watir.
Instance Method Summary collapse
-
#all(*args) ⇒ Object
Protractor all method.
-
#element(*args) ⇒ Object
Protractor element.
-
#initialize(watir) ⇒ ProtractorElement
constructor
A new instance of ProtractorElement.
Constructor Details
#initialize(watir) ⇒ ProtractorElement
Returns a new instance of ProtractorElement.
5 6 7 8 9 10 |
# File 'lib/angular_webdriver/protractor/protractor_element.rb', line 5 def initialize watir is_watir = watir.is_a?(Watir::Browser) raise 'Must init with a Watir::Browser' unless is_watir @watir = watir end |
Instance Attribute Details
#watir ⇒ Object (readonly)
Returns the value of attribute watir.
3 4 5 |
# File 'lib/angular_webdriver/protractor/protractor_element.rb', line 3 def watir @watir end |
Instance Method Details
#all(*args) ⇒ Object
Protractor all method.
Example: element.all(by.css(‘bar’))
29 30 31 |
# File 'lib/angular_webdriver/protractor/protractor_element.rb', line 29 def all *args watir.elements *args end |
#element(*args) ⇒ Object
Protractor element
Example: element(by.css(‘bar’))
18 19 20 21 |
# File 'lib/angular_webdriver/protractor/protractor_element.rb', line 18 def element *args return self unless args.length > 0 watir.element *args end |