Adding a test to check that text can be fetched from the value attribute
Showing
1 changed file
with
9 additions
and
0 deletions
... | @@ -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à</body></html>'); | 23 | this.setContent('<html><body>Voilà</body></html>'); | ... | ... |
-
Please register or sign in to post a comment