Commit c165386b c165386bcf66f193398fb39679e356ea1cddadff by Andy Gardner

Adding a test to check that text can be fetched from the value attribute

1 parent bb706acd
...@@ -9,6 +9,15 @@ casper.test.begin('fetchText() basic tests', 1, function(test) { ...@@ -9,6 +9,15 @@ casper.test.begin('fetchText() basic tests', 1, function(test) {
9 }); 9 });
10 }); 10 });
11 11
12 casper.test.begin('fetchText() basic tests', 1, function(test) {
13 casper.start('tests/site/index.html', function() {
14 test.assertEquals(this.fetchText('input[name="dummy_name"]'), 'dummy_value',
15 'Casper.fetchText() can retrieve text contents from an input element');
16 }).run(function() {
17 test.done();
18 });
19 });
20
12 casper.test.begin('fetchText() handles HTML entities', 1, function(test) { 21 casper.test.begin('fetchText() handles HTML entities', 1, function(test) {
13 casper.start().then(function() { 22 casper.start().then(function() {
14 this.setContent('<html><body>Voil&agrave;</body></html>'); 23 this.setContent('<html><body>Voil&agrave;</body></html>');
......