Created
July 8, 2016 09:16
-
-
Save widyou/c91eaa83c73a385449d110e52a8d0a0c to your computer and use it in GitHub Desktop.
attendance to inven community with casperjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var casper = require('casper').create({ | |
pageSettings: { | |
userAgent: 'Mozilla/5.0 (Windows NT 10.0; WOW64; rv:47.0) Gecko/20100101 Firefox/47.0' | |
} | |
}); | |
casper.start('http://imart.inven.co.kr/attendance/').then(function() { | |
var checkText = this.evaluate(function() { | |
if ($('#comLeftOutloginV2').find('fieldset').length === 1) | |
return $('#comLeftOutloginV2').find('fieldset').text().replace(/\s+/g, ' '); | |
else | |
return ''; | |
}); | |
this.echo(checkText); | |
}).run(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment