Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allowing for button[type=submit] elements to be clicked #62

Merged
merged 1 commit into from Aug 29, 2011
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion Readme.md
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
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