Navigate to the account homepage on the the Hess Energy website https://hessenergy.com.
npm install -S hess-load-account-homepage
Login with a given username and password. THen call the load account homepage module. If the account homepage is loaded correctly, the module will return a cheerio object of the account homepage html
var performLogin = require('hess-login')
var loadAccountHomepage = require('hess-load-account-homepage')
var username = 'fooUsername'
var password = 'fooPassword'
var currentLogin = {
username: username,
password: password
}
performLogin(currentLogin, function (err, reply) {
if (err) {
inspect(err, 'error performing login')
return
}
loadAccountHomepage(jar, function (err, $) {
if (err) {
inspect(err, 'error loading account homepage')
return
}
// $ is a cheerio object of the loaded account homepage.
inspect('account homepage loaded correctly')
})
})
# install development dependencies
npm install
# run tests
npm test