Module: TerminusSpec::Factory
- Defined in:
- lib/terminus_spec/factory.rb
Instance Method Summary collapse
-
#on(page_class, visit = false, &block) ⇒ PageObject
This is the method that creates a page object.
-
#visit(page_class, &block) ⇒ PageObject
This is the method that visits a page object after it has been created.
Instance Method Details
#on(page_class, visit = false, &block) ⇒ PageObject
This is the method that creates a page object.
it is created
20 21 22 23 24 |
# File 'lib/terminus_spec/factory.rb', line 20 def on(page_class, visit=false, &block) @page = page_class.new(@browser, visit) block.call @page if block @page end |
#visit(page_class, &block) ⇒ PageObject
This is the method that visits a page object after it has been created.
9 10 11 |
# File 'lib/terminus_spec/factory.rb', line 9 def visit(page_class, &block) on page_class, true, &block end |