PhantomJS - goBack()



This function returns the previous page in the navigation history, if only the navigation is not locked.

Syntax

Its syntax is as follows −

wpage.goBack()

Example

var wpage = require('webpage').create(); 
wpage.open('http://localhost/tasks/test.html', function(status) { 
   var value = wpage.goBack(); 
   console.log(value); 
   phantom.exit(); 
});

The above program generates the following output.

False
phantomjs_webpage_module_methods.htm
Advertisements