Skip to content

Commit

Permalink
Change UserAgent for casperjs
Browse files Browse the repository at this point in the history
Changes the casperjs UserAgent to the same value used by phantomjs.

Fixes bbc#601
  • Loading branch information
kentr committed Nov 27, 2018
1 parent 28d9973 commit f437115
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/wraith/javascript/casper.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// modules
var system = require('system'),
casper = require('casper').create(),
helper = requireRelative('_helper.js')(casper.cli.get(1));
helper = requireRelative('_helper.js')(casper.cli.get(1));

// command line arguments
var url = casper.cli.get(0),
Expand Down Expand Up @@ -53,9 +53,11 @@ else {
}

// Casper can now do its magic
casper.userAgent('Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_2) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/28.0.1500.95 Safari/537.17');
casper.start();
casper.open(url);
casper.viewport(currentDimensions.viewportWidth, currentDimensions.viewportHeight);

casper.then(function() {
var self = this;
if (globalBeforeCaptureJS && pathBeforeCaptureJS) {
Expand Down

0 comments on commit f437115

Please sign in to comment.