plant.js
v0.0.0
Published
bye zombie
Downloads
7
Readme
plant.js
var Plant = require('plant.js');
var browser = new Plant(); // <- You can pass defaults for request.
browser.get('http://www.theuselessweb.com/')
.then(function($) {
console.log($('h3').text()); // USELESS
return browser.follow('a:nth-child(2)'); // <- Follows link with this selector
})
.then(function($) {
console.log($('.text-holster h1').text()); // SHUT UP& LOOK
return browser.get('http://www.theuselessweb.com/');
})
.then(function($) {
console.log($('h3').text()); // USELESS
})
.catch(function(e) {
return console.trace(e);
});