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
1456d23e
...
1456d23e1df2bac003792760c33362f2eb9c48c2
authored
2013-02-24 21:46:59 +0100
by
Nicolas Perriault
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fixed #389 - check that uploaded file path exists
1 parent
41d61fdb
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
0 deletions
modules/casper.js
modules/casper.js
View file @
1456d23
...
...
@@ -731,6 +731,9 @@ Casper.prototype.fill = function fill(selector, vals, submit) {
}
else
{
(
function
_each
(
self
)
{
fillResults
.
files
.
forEach
(
function
_forEach
(
file
)
{
if
(
!
fs
.
exists
(
file
.
path
))
{
throw
new
CasperError
(
'Cannot upload unexistent file: '
+
file
.
path
);
}
var
fileFieldSelector
=
[
selector
,
'input[name="'
+
file
.
name
+
'"]'
].
join
(
' '
);
self
.
page
.
uploadFile
(
fileFieldSelector
,
file
.
path
);
});
...
...
Please
register
or
sign in
to post a comment