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
2a9e2c55
...
2a9e2c55040c266c1a9705bf3255c874b2f29861
authored
2011-10-11 23:58:07 +0200
by
Nicolas Perriault
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
added documentation for Casper#getCurrentUrl()
1 parent
752eaef0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
README.md
README.md
View file @
2a9e2c5
...
...
@@ -152,6 +152,7 @@ faultTolerant | Boolean | true | Catch and log exceptions when executing
logLevel | String | "error" | Logging level (see logLevels for available values)
onDie | function | null | A function to be called when Casper#die() is called
onError | function | null | A function to be called when an "error" level event occurs
onLoadError | function | null | A function to be called when a requested resource cannot be loaded
onPageInitialized | function | null | A function to be called after WebPage instance has been initialized
page | WebPage | null | An existing WebPage instance
pageSettings | Object | {} | PhantomJS's WebPage settings object
...
...
@@ -410,6 +411,20 @@ casper.start('http://some.tld/contact.form', function(self) {
**WARNING:**
Please don't use CasperJS nor PhantomJS to send spam, or I'll be calling the Chuck. More seriously, please don't.
### Casper#getCurrentUrl()
Retrieves current URL of current document. Note: the url will be url-decoded.
Example:
```
javascript
casper
.
start
(
'http://www.google.fr/'
,
function
(
self
)
{
self
.
log
(
self
.
getCurrentUrl
());
// "http://www.google.fr/"
}).
run
(
function
(
self
)
{
self
.
exit
();
});
```
### Casper#repeat(int times, function then)
Repeats a navigation step a given number of times.
...
...
Please
register
or
sign in
to post a comment