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
0c2c4666
...
0c2c466629e2510755354e75d7297bf8ef267ba0
authored
2011-11-08 14:46:22 +0100
by
Nicolas Perriault
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fixed Casper.click default value casting of the 'fallbackToHref' arg
1 parent
90afad2b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
casper.js
casper.js
View file @
0c2c466
...
...
@@ -202,7 +202,7 @@
* @return Boolean
*/
click
:
function
(
selector
,
fallbackToHref
)
{
fallbackToHref
=
typeof
(
fallbackToHref
)
==
"undefined"
?
true
:
false
;
fallbackToHref
=
typeof
(
fallbackToHref
)
==
"undefined"
?
true
:
!!
fallbackToHref
;
this
.
log
(
"click on selector: "
+
selector
,
"debug"
);
return
this
.
evaluate
(
function
()
{
return
__utils__
.
click
(
__casper_params__
.
selector
,
__casper_params__
.
fallbackToHref
);
...
...
@@ -778,7 +778,7 @@
* @return Boolean
*/
this
.
click
=
function
(
selector
,
fallbackToHref
)
{
fallbackToHref
=
typeof
(
fallbackToHref
)
==
"undefined"
?
true
:
false
;
fallbackToHref
=
typeof
(
fallbackToHref
)
==
"undefined"
?
true
:
!!
fallbackToHref
;
var
elem
=
this
.
findOne
(
selector
);
if
(
!
elem
)
{
return
false
;
...
...
Please
register
or
sign in
to post a comment