class Grell::Page::VisitedPage

Private class. This is a result page when we successfully got some information back after visiting the page. It delegates most of the information to the @rawpage capybara page. But any transformation or logic is here

Public Class Methods

new(rawpage) click to toggle source
# File lib/grell/page.rb, line 169
def initialize(rawpage)
  @rawpage = rawpage
end

Public Instance Methods

body() click to toggle source
# File lib/grell/page.rb, line 177
def body
  @rawpage.body
end
has_selector?(selector) click to toggle source
# File lib/grell/page.rb, line 203
def has_selector?(selector)
  @rawpage.has_selector?(selector)
end
headers() click to toggle source
# File lib/grell/page.rb, line 181
def headers
  @rawpage.headers
rescue Capybara::Poltergeist::BrowserError => e #This may happen internally on Poltergeist, they claim is a bug.
  {
    grellStatus: 'Error',
    errorClass: e.class.to_s,
    errorMessage: e.message
  }
end
host() click to toggle source
# File lib/grell/page.rb, line 195
def host
  @rawpage.host
end
status() click to toggle source
# File lib/grell/page.rb, line 173
def status
  @rawpage.status
end
visited?() click to toggle source
# File lib/grell/page.rb, line 199
def visited?
  true
end

Private Instance Methods