A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://www.rubydoc.info/github/teamcapybara/capybara/Capybara/Node/DocumentMatchers below:

DocumentMatchers – Documentation for teamcapybara/capybara (master) – RubyDoc.info

Module: Capybara::Node::DocumentMatchers
Included in:
Document, Simple
Defined in:
lib/capybara/node/document_matchers.rb
Instance Method Summary collapse Instance Method Details #assert_no_title(string, **options) ⇒ true #assert_no_title(regexp, **options) ⇒ true

Asserts that the page doesn't have the given title.

32
33
34
35
36
# File 'lib/capybara/node/document_matchers.rb', line 32

def assert_no_title(title, **options)
  _verify_title(title, options) do |query|
    raise Capybara::ExpectationNotMet, query.negative_failure_message if query.resolves_for?(self)
  end
end
#assert_title(string, **options) ⇒ true #assert_title(regexp, **options) ⇒ true

Asserts that the page has the given title.

19
20
21
22
23
# File 'lib/capybara/node/document_matchers.rb', line 19

def assert_title(title, **options)
  _verify_title(title, options) do |query|
    raise Capybara::ExpectationNotMet, query.failure_message unless query.resolves_for?(self)
  end
end
#has_no_title?(string, **options) ⇒ Boolean #has_no_title?(regexp, **options) ⇒ Boolean

Checks if the page doesn't have the given title.

54
55
56
# File 'lib/capybara/node/document_matchers.rb', line 54

def has_no_title?(title, **options)
  make_predicate(options) { assert_no_title(title, **options) }
end
#has_title?(string, **options) ⇒ Boolean #has_title?(regexp, **options) ⇒ Boolean

Checks if the page has the given title.

44
45
46
# File 'lib/capybara/node/document_matchers.rb', line 44

def has_title?(title, **options)
  make_predicate(options) { assert_title(title, **options) }
end

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4