Skip to content

Commit

Permalink
implement node#selected?
Browse files Browse the repository at this point in the history
  • Loading branch information
halogenandtoast committed Jul 29, 2011
1 parent 983b556 commit 63e5a53
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/capybara/driver/webkit/node.rb
Expand Up @@ -53,6 +53,10 @@ def visible?
invoke("visible") == "true"
end

def selected?
invoke("selected") == "true"
end

def checked?
self['checked']
end
Expand Down
4 changes: 4 additions & 0 deletions src/capybara.js
Expand Up @@ -91,6 +91,10 @@ Capybara = {
return true;
},

selected: function (index) {
return this.nodes[index].selected;
},

value: function(index) {
return this.nodes[index].value;
},
Expand Down

0 comments on commit 63e5a53

Please sign in to comment.