Module: WatirPageHelper
- Included in:
- Page
- Defined in:
- lib/watir-page-helper.rb,
lib/watir-page-helper/commands.rb,
lib/watir-page-helper/generated.rb
Overview
A helper mixin to make accessing web elements via Watir-WebDriver easier. This module assumes there is a @browser variable available.
Defined Under Namespace
Modules: ClassMethods, Commands Classes: Page
Class Attribute Summary collapse
-
.browser ⇒ Object
Returns the value of attribute browser.
Class Method Summary collapse
- .close ⇒ Object
- .create ⇒ Object
-
.included(cls) ⇒ Nil
A method that is called when this Module is included into a class.
Class Attribute Details
.browser ⇒ Object
Returns the value of attribute browser.
19 20 21 |
# File 'lib/watir-page-helper/commands.rb', line 19 def browser @browser end |
Class Method Details
.close ⇒ Object
25 26 27 |
# File 'lib/watir-page-helper/commands.rb', line 25 def close @browser.close end |
.create ⇒ Object
21 22 23 |
# File 'lib/watir-page-helper/commands.rb', line 21 def create @browser = ::Watir::Browser.new ENV['WEBDRIVER'] || :firefox end |
.included(cls) ⇒ Nil
A method that is called when this Module is included into a class
10 11 12 |
# File 'lib/watir-page-helper.rb', line 10 def self.included(cls) cls.extend ClassMethods end |