PhantomJS - frameUrl Property
This property will return the URL of the currently focused frame.
Syntax
Its syntax is as follows −
var wpage = require('webpage').create();
wpage.frameUrl;
Example
Let us take an example to understand the use of frameUrl property.
var wpage = require('webpage').create();
wpage.open('http://localhost/tasks/content.html', function (status) {
console.log(status);
console.log(wpage.frameUrl);
phantom.exit();
});
The above program generates the following output.
success http://localhost/tasks/content.html
phantomjs_webpage_module_properties.htm
Advertisements