Skip to content

Commit

Permalink
Documentation updates - fixes issue #1267 [ci skip]
Browse files Browse the repository at this point in the history
  • Loading branch information
twalpole committed Aug 25, 2015
1 parent cc407e2 commit 6b7c0ee
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
12 changes: 7 additions & 5 deletions lib/capybara/node/actions.rb
Expand Up @@ -20,19 +20,21 @@ def click_link_or_button(locator, options={})
# alt text inside the link.
#
# @param [String] locator text, id, title or nested image's alt attribute
# @param options
# @option options [String, Regexp] :href The value the href attribute must equal
# @param options See {Capybara::Node::Finders#find_link}
#
def click_link(locator, options={})
find(:link, locator, options).click
end

##
#
# Finds a button by id, text, value or title and clicks it.
#
# @param [String] locator Text, id, value or title of button
# Finds a button on the page and clicks it.
# This can be any \<input> element of type submit, reset, image, button or it can be a
# \<button> element. All buttons can be found by their id, value, or title. \<button> elements can also be found
# by their text content, and image \<input> elements by their alt attribute
#
# @param [String] locator Which button to find
# @param options See {Capybara::Node::Finders#find_button}
def click_button(locator, options={})
find(:button, locator, options).click
end
Expand Down
7 changes: 5 additions & 2 deletions lib/capybara/node/finders.rb
Expand Up @@ -83,8 +83,11 @@ def find_link(locator, options={})

##
#
# Find a button on the page. The button can be found by its id, name or value.
#
# Find a button on the page.
# This can be any \<input> element of type submit, reset, image, button or it can be a
# \<button> element. All buttons can be found by their id, value, or title. \<button> elements can also be found
# by their text content, and image \<input> elements by their alt attribute

# @macro waiting_behavior
#
# @param [String] locator Which button to find
Expand Down

0 comments on commit 6b7c0ee

Please sign in to comment.