Class: Gamera::Page
- Inherits:
-
Object
- Object
- Gamera::Page
- Extended by:
- Forwardable
- Includes:
- Capybara::DSL, Visitable
- Defined in:
- lib/gamera/page.rb
Overview
This is a base class which implements common methods for page object classes.
You can use this to create a Ruby class which wraps a web page, providing an API for automating elements or processes on the page
Constant Summary
Constants included from Visitable
Visitable::CAPYBARA_DEFAULT_MAX_WAIT_TIME
Instance Attribute Summary collapse
-
#url ⇒ Object
readonly
Returns the value of attribute url.
-
#url_matcher ⇒ Object
readonly
Returns the value of attribute url_matcher.
Instance Method Summary collapse
-
#initialize(url, url_matcher = nil) ⇒ Page
constructor
A new instance of Page.
Methods included from Visitable
#displayed?, #visit, #with_refreshes
Constructor Details
#initialize(url, url_matcher = nil) ⇒ Page
Returns a new instance of Page.
143 144 145 146 |
# File 'lib/gamera/page.rb', line 143 def initialize(url, url_matcher = nil) @url = url @url_matcher = url_matcher || /#{url}/ end |
Instance Attribute Details
#url ⇒ Object (readonly)
Returns the value of attribute url.
139 140 141 |
# File 'lib/gamera/page.rb', line 139 def url @url end |
#url_matcher ⇒ Object (readonly)
Returns the value of attribute url_matcher.
139 140 141 |
# File 'lib/gamera/page.rb', line 139 def url_matcher @url_matcher end |