Module: CapybaraErrorIntel::DSL

Defined in:
lib/capybara_error_intel/dsl.rb

Instance Method Summary collapse

Instance Method Details

#has_button?(locator, options = {}) ⇒ Boolean

Returns:

  • (Boolean)


12
13
14
# File 'lib/capybara_error_intel/dsl.rb', line 12

def has_button?(locator, options={})
  has_selector?(:button, locator, options)
end

#has_checked_field?(locator, options = {}) ⇒ Boolean

Returns:

  • (Boolean)


24
25
26
# File 'lib/capybara_error_intel/dsl.rb', line 24

def has_checked_field?(locator, options={})
  has_selector?(:field, locator, options.merge(:checked => true))
end

#has_css?(css, options = {}) ⇒ Boolean

Returns:

  • (Boolean)


8
9
10
# File 'lib/capybara_error_intel/dsl.rb', line 8

def has_css?(css, options={})
  has_selector?(:css, css, options)
end

#has_field?(locator, options = {}) ⇒ Boolean

Returns:

  • (Boolean)


16
17
18
# File 'lib/capybara_error_intel/dsl.rb', line 16

def has_field?(locator, options={})
  has_selector?(:field, locator, options)
end

#has_select?(locator, options = {}) ⇒ Boolean

Returns:

  • (Boolean)


32
33
34
# File 'lib/capybara_error_intel/dsl.rb', line 32

def has_select?(locator, options={})
  has_selector?(:select, locator, options)
end

#has_selector?(*args) ⇒ Boolean

Returns:

  • (Boolean)


3
4
5
6
# File 'lib/capybara_error_intel/dsl.rb', line 3

def has_selector?(*args)
  matcher = has_selector(*args)
  match_or_error(matcher)
end

#has_table?(locator, options = {}) ⇒ Boolean

Returns:

  • (Boolean)


36
37
38
# File 'lib/capybara_error_intel/dsl.rb', line 36

def has_table?(locator, options={})
  has_selector?(:table, locator, options)
end

#has_text?(*args) ⇒ Boolean Also known as: has_content?

Returns:

  • (Boolean)


40
41
42
43
# File 'lib/capybara_error_intel/dsl.rb', line 40

def has_text?(*args)
  matcher = has_text(*args)
  match_or_error(matcher)
end

#has_title?(title, options = {}) ⇒ Boolean

Returns:

  • (Boolean)


46
47
48
49
# File 'lib/capybara_error_intel/dsl.rb', line 46

def has_title?(title, options = {})
  matcher = has_title(title, options)
  match_or_error(matcher)
end

#has_unchecked_field?(locator, options = {}) ⇒ Boolean

Returns:

  • (Boolean)


28
29
30
# File 'lib/capybara_error_intel/dsl.rb', line 28

def has_unchecked_field?(locator, options={})
  has_selector?(:field, locator, options.merge(:unchecked => true))
end

#has_xpath?(xpath, options = {}) ⇒ Boolean

Returns:

  • (Boolean)


20
21
22
# File 'lib/capybara_error_intel/dsl.rb', line 20

def has_xpath?(xpath, options={})
  has_selector?(:xpath, locator, options)
end