Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/howitzer/helpers.rb
Instance Method Summary collapse
-
#as_page_class ⇒ Object
Returns page class.
- #given ⇒ Object
-
#open(*args) ⇒ Object
Delegates WebPage.open method.
Instance Method Details
#as_page_class ⇒ Object
Returns page class
149 150 151 |
# File 'lib/howitzer/helpers.rb', line 149 def as_page_class Object.const_get("#{self.capitalize}Page") end |
#given ⇒ Object
140 141 142 |
# File 'lib/howitzer/helpers.rb', line 140 def given as_page_class.new end |
#open(*args) ⇒ Object
Delegates WebPage.open method. Useful in cucumber step definitions
Parameters:
-
*args - Url to be opened
130 131 132 |
# File 'lib/howitzer/helpers.rb', line 130 def open(*args) as_page_class.open(*args) end |