Questions tagged [casperjs]

CasperJS is a JavaScript based navigation scripting & testing utility for PhantomJS (WebKit) and SlimerJS (Gecko). See SpookyJS for the use of CasperJS inside of node.js.

Definition:

From the Official Documentation:

CasperJS is an open source navigation scripting & testing utility written in JavaScript for the headless browser and (). It eases the process of defining a full navigation scenario and provides useful high-level functions, methods & syntactic sugar for doing common tasks such as:


Important Links:


Related Tags:

2447 questions
0
votes
1 answer

CasperJS how to check verbose value (True or False) , Loglevel in casper js code

I have a scenario like I need to check what is the current log level for the casperJS . Can I ? Can i introduce any custom log level in casperJS. I have gone through the documentation but I could not find any information. Thanks, Arjun N
0
votes
1 answer

spookyjs hello.js can't recognize module tiny-jsonrpc

I have copied example code from spookyjs npm web-page: try { var Spooky = require('spooky'); } catch (e) { Spooky = require('node_modules/spooky'); } var spooky = new Spooky({ child: { transport: 'http' }, …
0
votes
2 answers

Clicking via casperjs

Trying to click the below element via casperjs, but it's not working for me. Pay Button
Phoeniyx
  • 542
  • 4
  • 15
0
votes
1 answer

How to capture the screen after evaluate in casperjs?

Here is my code: var casper = require('casper').create({ clientScripts: ["jquery.js"] }); var URL = casper.cli.get(0); casper.start(URL, function (){ casper.evaluate(function() { …
Melon NG
  • 2,568
  • 6
  • 27
  • 52
0
votes
1 answer

how to pass decimal to CasperJS via CLI?

Here is my code: var casper = require('casper').create({ }); var D = casper.cli.get(0); casper.echo(D); casper.run(); and when i run it: G:\GG\casperjs-1.1.3\bin>casperjs 3.js 100.00 100 G:\GG\casperjs-1.1.3\bin> I showed 100 but not…
Melon NG
  • 2,568
  • 6
  • 27
  • 52
0
votes
1 answer

Why this simple script in CasperJS doesn't work on bestbuy.com

I'm doing some exercises with CasperJS and I'm stuck in a pretty simple exercise. I don't know if bestbuy.com website blocks the connection in some way. I've tried some different websites and they just work fine. The Title is not printed on the…
Rafa
  • 115
  • 1
  • 8
0
votes
0 answers

Casper JS for loop not working in evaluate

Hi I am trying to loop through a node list in an CASPERJS evaluate statement like so : var t = this.evaluate(function() { var t = document.querySelectorAll('.status'); var r = []; for(var x = 0; x < t.length; x ++) { …
frank astin
  • 115
  • 10
0
votes
3 answers

Error when trying to run Phantomjs

phantom.casperPath +('/Users/AustinJ/Desktop/streakscraper/node_modules/casperjs'); phantom.injectJs = (phantom.caperPath + '/Users/AustinJ/Desktop/streakscraper/node_modules/casperjs/bin/bootstrap.js'); var utils =…
Austin Johnson
  • 697
  • 11
  • 23
0
votes
0 answers

Facebook Login Button - Click with casperjs/phantomjs dont work

i try to test the facebook login with CasperJS, but when "click" no popup are shown in the screenshots. But when i click manually in the browser it works. casper.then(function () { casper.waitForSelector('.fb-login-button iframe', function ()…
0
votes
0 answers

Looping through array and clicking each link via CasperJS

I have been using CasperJS and managed to load a page I am looking at and pull data from it. I am now looking at how to pull a list of links I want to click on and pull data from each page that opens. Here is what I have attempted so…
user3473406
  • 115
  • 1
  • 10
0
votes
1 answer

how to set proxy in casperjs code

Here are some options i already try but none of them work for me is there any way to change proxy before we hit any particular website ? var casper = require("casper").create({ setProxy: "proxy here", // --proxy: "proxy here", webSecurityEnabled:…
0
votes
1 answer

casperjs submit form without button

I'm trying to get to a download on the other side of this form, but there's no button to click. How can I tell casperJS to execute the function document.forms.item(0).submit() so I can get to the file?
brainstormtrooper
  • 485
  • 2
  • 6
  • 18
0
votes
1 answer

casperjs/phantomjs how to click an href="javascript:function" and get the resulted content

Im a newbie to phantomjs/casperjs. Im trying to click an href that has a javascript function (href='javascript:getPhoneNumber(....)) and I want to get the printed result which an a png image. here is the html block before the click:
0
votes
1 answer

How to change angular scope values using Casperjs

I was trying to automate some test cases for an angular booking app I was working on ,where I wanted to write a test case that was to be integrated with bitbucket pipeline. I found casperjs easy to start with. There came a stage when I had to…
32teeths
  • 1,469
  • 1
  • 15
  • 32
0
votes
1 answer

Casperjs did not render page completely

I tried to visit the webpage and capture with casperjs, but nothing showed in .png and no final html DOMs generated.(Page works perfectly in chrome browser) Code: var casper = require('casper').create({ verbose: true, logLevel:…
ansvver
  • 317
  • 1
  • 12
1 2 3
99
100