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
03cd587d
...
03cd587d54fc43369a36e2c12843cd34e03572e7
authored
2011-11-10 11:04:26 +0100
by
Maisons du monde
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Added a new "thenClick" step to act as "thenOpen" on clicks
1 parent
c4b56950
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
casper.js
casper.js
100644 → 100755
View file @
03cd587
...
...
@@ -225,6 +225,21 @@
},
/**
* Adds a new navigation step for clicking on a provided link.
*
* @param String selector A DOM CSS3 compatible selector
* @param function then Next step function to execute on page loaded (optional)
* @return Casper
* @see Casper#open
*/
thenClick
:
function
(
selector
,
fallbackToHref
,
then
)
{
this
.
then
(
function
(
self
)
{
self
.
click
(
selector
,
fallbackToHref
);
});
return
typeof
then
===
"function"
?
this
.
then
(
then
)
:
this
;
},
/**
* Logs the HTML code of the current page.
*
* @return Casper
...
...
Please
register
or
sign in
to post a comment