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
947f1baf
...
947f1baffe0b45a1964973e3705048073df43c22
authored
2013-09-27 18:43:58 +0200
by
Nicolas Perriault
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fixes #644 - better handling of deleted page objects
1 parent
effe51a5
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
0 deletions
modules/casper.js
modules/casper.js
View file @
947f1ba
...
...
@@ -938,9 +938,16 @@ Casper.prototype.getPageContent = function getPageContent() {
Casper
.
prototype
.
getCurrentUrl
=
function
getCurrentUrl
()
{
"use strict"
;
this
.
checkStarted
();
try
{
return
utils
.
decodeUrl
(
this
.
evaluate
(
function
_evaluate
()
{
return
document
.
location
.
href
;
}));
}
catch
(
e
)
{
// most likely the current page object has been "deleted" (think closed popup)
if
(
/deleted QObject/
.
test
(
e
.
message
))
return
""
;
throw
e
;
}
};
/**
...
...
Please
register
or
sign in
to post a comment