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
a04a5b36
...
a04a5b3611988b6f301bee28d1fdf390d3cb5054
authored
2013-04-14 13:58:28 -0400
by
Matt Bowman
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Made parameter names more specific in selectorFunction functions
1 parent
90ab53e3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
9 deletions
modules/casper.js
modules/clientutils.js
modules/casper.js
View file @
a04a5b3
...
...
@@ -823,10 +823,10 @@ Casper.prototype.fillNames = function fillNames(formSelector, vals, submit) {
"use strict"
;
return
this
.
fillForm
(
formSelector
,
vals
,
{
submit
:
submit
,
selectorFunction
:
function
_nameSelector
(
selector
,
form
)
{
selectorFunction
:
function
_nameSelector
(
elementName
,
formSelector
)
{
return
{
fullSelector
:
[
form
,
'[name="'
+
selector
+
'"]'
].
join
(
' '
),
elts
:
(
this
.
findAll
?
this
.
findAll
(
'[name="'
+
selector
+
'"]'
,
form
)
:
null
)
fullSelector
:
[
form
Selector
,
'[name="'
+
elementName
+
'"]'
].
join
(
' '
),
elts
:
(
this
.
findAll
?
this
.
findAll
(
'[name="'
+
elementName
+
'"]'
,
formSelector
)
:
null
)
};
}
});
...
...
@@ -852,10 +852,10 @@ Casper.prototype.fillSelectors = function fillSelectors(formSelector, vals, subm
"use strict"
;
return
this
.
fillForm
(
formSelector
,
vals
,
{
submit
:
submit
,
selectorFunction
:
function
_css3Selector
(
selector
,
form
)
{
selectorFunction
:
function
_css3Selector
(
inputSelector
,
formSelector
)
{
return
{
fullSelector
:
[
form
,
s
elector
].
join
(
' '
),
elts
:
(
this
.
findAll
?
this
.
findAll
(
selector
,
form
)
:
null
)
fullSelector
:
[
form
Selector
,
inputS
elector
].
join
(
' '
),
elts
:
(
this
.
findAll
?
this
.
findAll
(
inputSelector
,
formSelector
)
:
null
)
};
}
});
...
...
modules/clientutils.js
View file @
a04a5b3
...
...
@@ -209,10 +209,10 @@
files
:
[]
};
findFunction
=
findFunction
||
function
_nameSelector
(
name
,
form
)
{
findFunction
=
findFunction
||
function
_nameSelector
(
elementName
,
formSelector
)
{
return
{
fullSelector
:
[
form
,
'[name="'
+
n
ame
+
'"]'
].
join
(
' '
),
elts
:
this
.
findAll
(
'[name="'
+
name
+
'"]'
,
form
)
fullSelector
:
[
form
Selector
,
'[name="'
+
elementN
ame
+
'"]'
].
join
(
' '
),
elts
:
this
.
findAll
(
'[name="'
+
elementName
+
'"]'
,
formSelector
)
};
};
...
...
Please
register
or
sign in
to post a comment