Skip to content

Commit 166922b

Browse files
committed
Update download.js
1 parent 3f66cab commit 166922b

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

.travis/download.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,20 +19,19 @@ var agreementUrl = casper.cli.get(2);
1919
var downloadUrl = casper.cli.get(3);
2020
var downloaded = false;
2121

22+
phantom.addCookie({
23+
'name': 'oraclelicense',
24+
'value': '152021',
25+
'domain': 'oracle.com'
26+
});
27+
2228
casper.start();
2329
// TODO: Error handling.
2430

25-
// Accept the license agreement.
26-
casper.thenOpen(agreementUrl, function () {
27-
// this.echo("Accepting License");
28-
this.evaluate(function () {
29-
acceptAgreement(window.self);
30-
});
31-
});
3231

3332
// Try to access the download page, wait for redirection and submit the login form.
3433
casper.thenOpen(downloadUrl).waitForUrl(/signon\.jsp$/, function (re) {
35-
// this.echo("Injecting Login Info");
34+
//this.echo("Injecting Login Info");
3635
this.evaluate(function (username, password) {
3736
document.getElementById("sso_username").value = username;
3837
document.getElementById("ssopassword").value = password;
@@ -42,8 +41,9 @@ casper.thenOpen(downloadUrl).waitForUrl(/signon\.jsp$/, function (re) {
4241
});
4342

4443
casper.on("resource.received", function (resource) {
44+
//this.echo("Received something: " + resource.url);
4545
if (resource.url.indexOf("AuthParam") !== -1 && !downloaded) {
46-
// this.echo("DownloadUrl:");
46+
//this.echo("DownloadUrl:");
4747
// Print the download url.
4848
this.echo(resource.url);
4949
downloaded = true;

0 commit comments

Comments
 (0)