Skip to content

Commit

Permalink
Allow for button[type=submit] elements to be clicked
Browse files Browse the repository at this point in the history
  • Loading branch information
sorich87 committed Aug 28, 2011
1 parent 4eaf8b3 commit a2ca84c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ The following locators will match the input:

### Browser#click(locator[, fn])

Tobi allows you to `click()` `a` elements, and `input[type=submit]` elements in order to submit a form, or request a url.
Tobi allows you to `click()` `a` elements, `button[type=submit]` elements, and `input[type=submit]` elements in order to submit a form, or request a url.

Submitting a form:

Expand Down
1 change: 1 addition & 0 deletions lib/jquery/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ module.exports = function(browser, $){
url = this.attr('href');
break;
case 'INPUT':
case 'BUTTON':
if ('submit' == this.attr('type')) {
var form = this.parents('form').last();
form.defaultSelectOptions();
Expand Down

0 comments on commit a2ca84c

Please sign in to comment.