class RailsJsdom::Page
The object behind TestHelper#page, for tests written as page.has_css?(...) or page.find(...). Every TestHelper method can be called on it.
assert page.has_css?(β.cart-itemβ, count: 2) page.find(β#menuβ).click
Public Instance Methods
Source
# File lib/rails_jsdom/page.rb, line 18 def body @test.rails_jsdom_page_snapshot.fetch("html") end
The HTML of the whole page.
Also aliased as: html
Source
# File lib/rails_jsdom/page.rb, line 29 def text @test.page_text end
The visible text of the page, or of the current TestHelper#within scope.
Source
# File lib/rails_jsdom/page.rb, line 24 def title @test.rails_jsdom_page_snapshot.fetch("title") end
The page title.