Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
John McEleney
/
casperjs
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit
c165386b
...
c165386bcf66f193398fb39679e356ea1cddadff
authored
2014-11-03 14:15:47 +0200
by
Andy Gardner
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Adding a test to check that text can be fetched from the value attribute
1 parent
bb706acd
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
tests/suites/casper/fetchtext.js
tests/suites/casper/fetchtext.js
View file @
c165386
...
...
@@ -9,6 +9,15 @@ casper.test.begin('fetchText() basic tests', 1, function(test) {
});
});
casper
.
test
.
begin
(
'fetchText() basic tests'
,
1
,
function
(
test
)
{
casper
.
start
(
'tests/site/index.html'
,
function
()
{
test
.
assertEquals
(
this
.
fetchText
(
'input[name="dummy_name"]'
),
'dummy_value'
,
'Casper.fetchText() can retrieve text contents from an input element'
);
}).
run
(
function
()
{
test
.
done
();
});
});
casper
.
test
.
begin
(
'fetchText() handles HTML entities'
,
1
,
function
(
test
)
{
casper
.
start
().
then
(
function
()
{
this
.
setContent
(
'<html><body>Voilà</body></html>'
);
...
...
Please
register
or
sign in
to post a comment