Module: Prickle::Capybara::Actions

Included in:
Element
Defined in:
lib/prickle/capybara/actions.rb

Instance Method Summary collapse

Instance Method Details

#clickObject



5
6
7
# File 'lib/prickle/capybara/actions.rb', line 5

def click
  find_element.click
end

#contains_text?(text) ⇒ Boolean

Returns:

  • (Boolean)


9
10
11
12
13
# File 'lib/prickle/capybara/actions.rb', line 9

def contains_text? text
  @text = text
  @identifier[:"text()".like] = text
  find_element
end

#exists?Boolean

Returns:

  • (Boolean)


21
22
23
# File 'lib/prickle/capybara/actions.rb', line 21

def exists?
  find_element
end

#has_text?(text) ⇒ Boolean

Returns:

  • (Boolean)


15
16
17
18
19
# File 'lib/prickle/capybara/actions.rb', line 15

def has_text? text
  @text = text
  @identifier[:"text()"] = text
  find_element
end