implement node#selected?

This commit is contained in:
Matthew Mongeau 2011-07-29 11:18:51 -04:00
parent 983b556fa8
commit 63e5a53c01
2 changed files with 8 additions and 0 deletions

View File

@ -53,6 +53,10 @@ class Capybara::Driver::Webkit
invoke("visible") == "true"
end
def selected?
invoke("selected") == "true"
end
def checked?
self['checked']
end

View File

@ -91,6 +91,10 @@ Capybara = {
return true;
},
selected: function (index) {
return this.nodes[index].selected;
},
value: function(index) {
return this.nodes[index].value;
},