46 lines
826 B
JavaScript
46 lines
826 B
JavaScript
|
var casper = require('casper').create({
|
||
|
viewportSize: {
|
||
|
width: 1024,
|
||
|
height: 768
|
||
|
},
|
||
|
verbose: true,
|
||
|
logLevel: "debug"
|
||
|
});
|
||
|
|
||
|
var rootUrl = 'https://quay.io/';
|
||
|
|
||
|
casper.start(rootUrl);
|
||
|
|
||
|
casper.on("remote.message", function(msg, trace) {
|
||
|
this.echo("Message: " + msg, "DEBUG");
|
||
|
});
|
||
|
|
||
|
casper.on("page.error", function(msg, trace) {
|
||
|
this.echo("Page error: " + msg, "ERROR");
|
||
|
});
|
||
|
|
||
|
casper.then(function() {
|
||
|
this.capture('landing.png');
|
||
|
});
|
||
|
|
||
|
casper.thenOpen(rootUrl + 'signin'), function () {
|
||
|
this.fill('form', {
|
||
|
'username': 'devtable',
|
||
|
'password': 'C>K98%y"_=54x"<',
|
||
|
}, true);
|
||
|
};
|
||
|
|
||
|
casper.then(function() {
|
||
|
this.capture('filled-signin.png');
|
||
|
});
|
||
|
|
||
|
casper.then(function() {
|
||
|
this.waitForText('Your Top Repositories');
|
||
|
});
|
||
|
|
||
|
casper.then(function() {
|
||
|
this.capture('user-home.png');
|
||
|
});
|
||
|
|
||
|
casper.run();
|