Module: AmsLayout::Pages
- Included in:
- Client
- Defined in:
- lib/ams_layout/pages.rb,
lib/ams_layout/pages/login_page.rb,
lib/ams_layout/pages/prequal_detail.rb
Defined Under Namespace
Classes: LoginPage, PrequalDetail
Instance Method Summary collapse
-
#browser ⇒ Object
Return a configured browser object.
Instance Method Details
#browser ⇒ Object
Return a configured browser object. If a browser has already been created, this returns the existing browser.
An at_exit
proc is created to close the browser when the program exits.
23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/ams_layout/pages.rb', line 23 def browser if @browser.nil? BrowserLoader.user_data_path = AmsLayout.configuration.user_data_path @browser = BrowserLoader.init_browser AmsLayout.configuration.browser_timeout at_exit do @browser.close unless @browser.nil? end end @browser end |