Commit 50255710 502557108eb595bee21449104f76516cae1f6937 by Yevgeny Smirnov

navigationRequested is true only when navigating to a different URL

1 parent 3a4ed2c8
......@@ -2203,7 +2203,7 @@ function createPage(casper) {
page.onNavigationRequested = function onNavigationRequested(url, type, lock, isMainFrame) {
casper.log(f('Navigation requested: url=%s, type=%s, lock=%s, isMainFrame=%s',
url, type, lock, isMainFrame), "debug");
if (isMainFrame) {
if (isMainFrame && casper.requestUrl !== url) {
casper.navigationRequested = true;
}
casper.emit('navigation.requested', url, type, lock, isMainFrame);
......