var casper = require('casper').create({
verbose: true,
logLevel: 'debug',
waitTimeout: 5000,
userAgent: 'Mozilla/5.0 (X11; Linux x86_64; rv:49.0) Gecko/20100101 Firefox/49.0',
viewportSize:{width: 1600, height: 900},
ignoreSslErrors: true,
cookiesFile: "biscuit",
maxDiskCacheSize: 1000,
diskCache: true,
sslProtocol: "any"
});
var urlBeforeLoggedIn = "https://creator.line.me/en/";
var urlAfterLoggedIn = "https://creator.line.me/my/634AJBVsvhsiLuJv/sticker/";
var user = 'xxx...@xxx.com';
var pass = 'xxxxxx';
casper.start();
casper.open("https://creator.line.me/en/").then(function() {
this.click('.mdGHD02Manager a');
this.waitForSelector('form',
function pass () {
this.fillSelectors('form',{
'input[name="tid"]': user,
'input[name="tpasswd"]': pass
}, true);
},
function fail () {
console.log("Did not load");
},
2000
).then(function(){
console.log("current url: " + this.getCurrentUrl());
});
});
casper.run();
this.sendKeys("#id",user);
this.sendKeys("#passwd",pass);
this.wait(2000);
this.capture("before_submit.png");
this.click(".MdBtn03Login");
this.wait(2000);
this.capture('after_submit.png');
--
CasperJS homepage & documentation: http://casperjs.org/
CasperJS @github: https://github.com/n1k0/casperjs
You received this message because you are subscribed to the Google Groups "casperjs" group.
Visit this group at http://groups.google.com/group/casperjs?hl=en.
---
You received this message because you are subscribed to a topic in the Google Groups "CasperJS" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/casperjs/pFxcyfl5Sc8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to casperjs+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.