Support Textareas#value
This commit is contained in:
parent
32c1502449
commit
c621e651c9
|
@ -86,11 +86,11 @@ describe Capybara::Session, "with TestApp" do
|
|||
@session = Capybara::Session.new(:reusable_webkit, TestApp)
|
||||
end
|
||||
|
||||
def extract_results(session)
|
||||
YAML.load Nokogiri::HTML(session.body).xpath("//pre[@id='results']").first.text
|
||||
end
|
||||
# def extract_results(session)
|
||||
# YAML.load Nokogiri::HTML(session.body).xpath("//pre[@id='results']").first.text
|
||||
# end
|
||||
|
||||
it_should_behave_like 'attach_file'
|
||||
# it_should_behave_like "session"
|
||||
# it_should_behave_like 'attach_file'
|
||||
it_should_behave_like "session"
|
||||
# it_should_behave_like "session with javascript support"
|
||||
end
|
||||
|
|
|
@ -28,7 +28,13 @@ Capybara = {
|
|||
},
|
||||
|
||||
text: function (index) {
|
||||
return this.nodes[index].innerText;
|
||||
var node = this.nodes[index];
|
||||
var type = (node.type || node.tagName).toLowerCase();
|
||||
if (type == "textarea") {
|
||||
return node.innerHTML;
|
||||
} else {
|
||||
return node.innerText;
|
||||
}
|
||||
},
|
||||
|
||||
attribute: function (index, name) {
|
||||
|
|
Loading…
Reference in New Issue