Method: Howitzer::Web::Page.open
- Defined in:
- lib/howitzer/web/page.rb
.open(validate: true, url_processor: nil, **params) ⇒ Page
Note:
It tries to open the page twice and then raises the error if a validation is failed
Opens a web page in browser
42 43 44 45 46 47 48 49 50 |
# File 'lib/howitzer/web/page.rb', line 42 def self.open(validate: true, url_processor: nil, **params) url = (params, url_processor) Howitzer::Log.info "Open #{name} page by '#{url}' url" retryable(tries: 2, logger: Howitzer::Log, trace: true, on: Exception) do |retries| Howitzer::Log.info 'Retry...' unless retries.zero? Capybara.current_session.visit(url) end given if validate end |