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.

casperjs
Filter by
Sorted by
Tagged with
0 votes
1 answer
561 views

Passing a variable into an XPath expression in CasperJS

I am using CasperJS to do some browser automation. Now I have an array, which contains text that can be found on some buttons that are randomly generated on the page. I pick a random button, and ...
Miha Šušteršič's user avatar
7 votes
1 answer
5k views

CasperJS / PhantomJS ES6 Promise Polyfill

I am currently working on trying to craft end to end tests using PhantomJS and CasperJS. What I've run into is a situation where PhantomJS lacks promises. Currently our project implements them. The ...
Ryan Rentfro's user avatar
  • 1,652
0 votes
1 answer
72 views

Test Should be Failing but is Not - Mocha and CasperJS

I'm using mocha-casperjs No idea why my test is giving me a false positive here. The html page renders aaaaa yet my test that is attempting to see if that div is rendering the text "No Companies ...
PositiveGuy's user avatar
  • 19.1k
3 votes
0 answers
650 views

Spookyjs error with Child terminated with non-zero exit code 3221225477

all I can run spookyjs program without a problem. However, if it runs over long period of time, e.g. 24 hours or 48 hours, continuously the program stops with this message. Anyone got a clue for ...
smith's user avatar
  • 31
0 votes
0 answers
806 views

casperjs - fill form / post form - solving death by captcha

have that simple Webform which i want to fill and than get text from the result page. <html><head></head><body><table><tr><td> <form method="post" action=...
swapfile's user avatar
  • 417
1 vote
1 answer
417 views

Fill dropdown list in CasperJS

I have a problem with dropdown list. List isn't filled. I try to use casper.fill and click, but it doesn't work.. html: <form id="login-form" novalidate="novalidate" name="login-form" > <div ...
Liza Dimitrieva's user avatar
1 vote
0 answers
569 views

CasperJS hangs out when accessing Google Keyword Planner

My goal is to grab keywords from Google Keyword Planner, as the API does not support getting search volume in last 24 months but 12 months only. I use maily SimpleBrowser, so I am new with CasperJS, ...
LordMagik's user avatar
0 votes
1 answer
881 views

CasperJS - Memory Exhausted

When I run this through command line, it goes for an hour or two, and then command line spits out "Memory Exhausted". I can't figure out what's going on. Also, some general advice about how to make ...
Daniel Paczuski Bak's user avatar
0 votes
2 answers
559 views

PhantomJS file upload not working with XPath expression

I can't seem to be able to make fileUpload work, I am using the script below but from the screenshot it is obvious that the file is not even selected in the form: Screenshot casper.thenOpen('https:/...
Stratos Ion's user avatar
0 votes
1 answer
560 views

Extract list of texts with CasperJS

I want to extract the text values out of this List: <ul class="standardSuggestions"> <li class=""> <div id="idac"> <span class="email" id="idb7"><...
swapfile's user avatar
  • 417
3 votes
1 answer
2k views

Can CasperJS run multiple instances in the same process?

I am trying to run multiple instances of CasperJS on the same process, my test code looks something like this: ['user1,pass1', 'user2,pass2'].forEach(function( account ) { var casperInstance = ...
Mark's user avatar
  • 586
2 votes
1 answer
229 views

Calculating an XPath of a given element in CasperJS

I am trying to use the getElementXPath function from Firebug to work in CasperJS but I can't seem to find the right place to call it for it to work. Here is what I have so far and it only works for ...
projectgonewrong's user avatar
1 vote
0 answers
324 views

Fetch API and CasperJS

I am trying to do something very similar to this thread, except that instead of XHR, the web app (written in React) uses the Fetch API to do its asynchronous calls. Is there an elegant way to ...
seapigg's user avatar
  • 11
2 votes
1 answer
183 views

Clicking a button should get an Ajax response, but reloads the whole page in CasperJS

I'm playing around with CasperJS and trying to catch some Free-Email Alias on https://registrierung.web.de/#.homepage.loginbox_1.1.registrierung So I have the input field: "E-Mail-Wunschname:" where ...
swapfile's user avatar
  • 417
1 vote
0 answers
76 views

Content of iframe isn't seen in screenshot

I try to do screenshot the page, but iframe doesn't be visible on image. But I can to fill fields in iframe. It's my page, but it's CasperJS's screnshot. casper.waitForSelector('div#...
Liza Dimitrieva's user avatar
0 votes
1 answer
42 views

Selector with changing Form IDs

i have a little Problem with Selection this Input form an the Submit Button within Casperjs. <div id="id1d9" style="display:none"></div> <div class="item wishname" id="id1da"&...
swapfile's user avatar
  • 417
0 votes
0 answers
30 views

Casperjs and Meteorjs [duplicate]

im trying to scrap a website and download a file and i found CasperJS as a good option and very mature. I did a server method (under SERVER folder) and i call this code just to test it: Meteor....
cristiandley's user avatar
0 votes
1 answer
82 views

Creating a casper instance with additional configuration such as injecting jQuery

I'd like to use jQuery with CasperJS, but it seems that I fail to inject jQuery into remote document. The code below is simplified code to show where the problem may exist. I know I need to use ...
user avatar
4 votes
2 answers
3k views

Do you need python to use casper.js ? if so why?

I never use python. The only language I know is JavaScript. I use node to do web work and I kept reading about how casper.js can scrape webpages. so I was thinking I could use it like usual. Now I am ...
jack blank's user avatar
  • 5,123
0 votes
1 answer
72 views

teach me how to set up a path correctly

I installed casperjs by npm install command on my mac os x. But, when I try using casperjs in command line, it gives me the error below. $ casperjs cas.js -bash: /usr/local/bin/casperjs: No such file ...
user avatar
1 vote
0 answers
294 views

Casperjs Not returning Google Search link titles BUT Screenshot & Source Code test works

Appreciate someone can help me with this problem I'm having. Please see my image to understand further. https://onedrive.live.com/redir?resid=F95DD828CA2E63D7!1326&authkey=!AEbavlKl38fBJYI&...
Ming's user avatar
  • 332
2 votes
1 answer
561 views

CasperJS returns different results when change setting a specific user agent string when scraping Google search

I'm loading a Google search page with a preset search term ("Apples"). Then I want to type into the search box to find something else, but it doesn't behave as expected (detailed description below the ...
Ming's user avatar
  • 332
0 votes
1 answer
450 views

Writing french characters to CSV file with CasperJS, but not displayed correctly

I'm using CasperJS, but none of this has to do with the web scraping part. I'm printing a string (containing french characters) to a csv. When I later open that csv file, all of the french characters ...
Daniel Paczuski Bak's user avatar
2 votes
0 answers
228 views

CasperJS Javascript not loading

var casper = require('casper').create({ verbose: true, logLevel: 'error', pageSettings: { loadImages: false, loadPlugins: false, javascriptEnabled: true, userAgent: '...
David Kagan's user avatar
1 vote
1 answer
274 views

CasperJS Button is clicked but doesnt redirect

var casper = require('casper').create({ verbose: true, logLevel: 'error', pageSettings: { userAgent: 'Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29....
David Kagan's user avatar
0 votes
0 answers
324 views

casperjs does not find popup selector

I have a casperjs script that logs into a page and then clicks a "watch video" button,upon which a popup with video is launched. Then I try to switch to the context of the popup using casper.withPopup....
kranitsky's user avatar
2 votes
0 answers
116 views

Programmatically getting the Authorization header for AJAX requests

I'm trying to work out my mobile data usage & I noticed there are simple APIs to query on https://secure.example.com/myaccountmgr/fapi/usage/data/... but they carry an Authorization: ...
hendry's user avatar
  • 10.2k
0 votes
1 answer
170 views

Scraping data from clicked links on page then moving to next page & repeating in CasperJS

I'm struggling to get a casperjs to move on to the next page after it has recursively worked through the links on the page. I can get it to take data from each page and move through the pages, or ...
Pete Herc's user avatar
  • 163
2 votes
2 answers
2k views

Click on some element based on its text content in CasperJS

I have the following retrieved from the web page: <a href="#" onclick="onClkRdMsg(this, 'IPM.Note', 1, b4);">next page</a> the onclick=onClkRdMsg is constantly changing, is there any ...
Robert Choy's user avatar
0 votes
0 answers
774 views

Casperjs web service multithread

I am using a CasperJS script as a web service, accessing it from a node server. What I did not manage to do is to make Casper be 'multithread'. If I make two simultaneously requests to Casper from ...
valentino's user avatar
0 votes
1 answer
5k views

casperjs can't click on reddit.com

my casperjs click is working fine in most web site, but when i try to click something on reddit, it wont click. casper.start(); casper.then(function (){ this.open("http://reddit.com"); }); casper....
Robert Choy's user avatar
0 votes
0 answers
211 views

CasperJS: execute evaluate failed while the same code succeed in Chrome console

The code: var array = casper.evaluate(function () { var nodes = document.querySelectorAll('#J_bought_main > div > div:nth-child(4) > div:nth-child(3) > div > div'); return ...
Sayakiss's user avatar
  • 6,962
0 votes
1 answer
169 views

Using CasperJS' getElementInfo in the page context

Data <a href="/route" data-eventid="train_card" data-eventlabel="2:10"> <strong>2:10</strong> <h5>Bristol to London</h5> <em>Platform 1</em> </a> ...
user2596590's user avatar
2 votes
0 answers
110 views

CasperJS Hangs When Called From Specific PHP Gearman Init

I need to run a casperJS script to be started from Gearman, via PHP. All works wonderfully when I start the Gearman worker from the CLI. But if I start the Gearman worker automatically via something ...
Daydream Nation's user avatar
0 votes
2 answers
231 views

Upload APK File to Google Play using CasperJS

I need to create a script that uploads for the first time a APK file to Google Play (their API only allows to upload APKs after the first version has been published). Here is the script I have so far:...
Maurício Giordano's user avatar
1 vote
1 answer
571 views

CasperJS and cronjob

so I have phantomJS and casperJS installed, everything is working fine, but I'm trying to add my casperJS file to cronjob (ubuntu) and I'm getting error: /bin/sh: 1: /usr/local/bin/casperjs: not ...
Aleksandr's user avatar
-1 votes
1 answer
368 views

CASPERJS - returned innerHTML is [Object Casper]

Here is a function which gets called by evaluate(): function getScanProgress(){ var resultString = document.querySelector('#p_lt_ctl03_pageplaceholder_p_lt_ctl03_CPSO_DoctorSearchResults_Label1')....
Daniel Paczuski Bak's user avatar
-1 votes
1 answer
595 views

CasperJS waitFor*() has very unclear behaviour

I'm trying to understand how CasperJS work in order to use it on my tests. What i try to accomplish is to take a screenshot of some element of the page when they are ready and fully loaded, i'm using ...
Stefano Saitta's user avatar
0 votes
0 answers
42 views

Verifying whether the Image has been generated or not using CasperJS

I am unable to verify for the image which will be generated after executing code. Below is the HTML code: <div class="live-plot-container"> <div class="live-plot"&...
Patrick's user avatar
  • 53
1 vote
1 answer
1k views

How to fill recaptcha with CasperJS?

I want to write test with CasperJS. But the form has recaptcha. <div class="recaptcha-checkbox" role="presentation"/> </span> How to fill this check-box?
Irene's user avatar
  • 11
0 votes
0 answers
113 views

Install CasperJS from git

From the docs, the process is: $ git clone git://github.com/n1k0/casperjs.git $ cd casperjs $ ln -sf `pwd`/bin/casperjs /usr/local/bin/casperjs After doing this, my error is as follows. What am I ...
ProGirlXOXO's user avatar
  • 2,240
0 votes
0 answers
319 views

Run Casperjs with specific version of Phantomjs

In response to this issue where newer PhantomJS is 10x slower: https://github.com/ariya/phantomjs/issues/14066 I want to run CasperJS with an older version of PhantomJS. I have globally installed ...
ProGirlXOXO's user avatar
  • 2,240
0 votes
1 answer
103 views

casperJS css selectors: waitFor function always times out

I am writing an automated login test and want to assert that I've logged into the page succesfully, and then take a screenshot of the page. The DOM I am trying to acces looks like this: <div ...
Miha Šušteršič's user avatar
5 votes
1 answer
21k views

Automate daily csv file download from website button click

I would like to automate the process of visiting a website, clicking a button, and saving the file. The only way to download the file on this site is to click a button. You can't navigate to the file ...
user's user avatar
  • 61
1 vote
0 answers
225 views

Casperjs fill input without name

i want to use facebook share dialog Link to share dialog with casperjs i managed to select the post mode "group" from the first dropdown , but i failed when i tired to fill the group name input (i ...
Lara Pink's user avatar
11 votes
2 answers
6k views

CasperJS : Why does my url change to about:blank when my page is loaded?

I'm a beginner at PhantomJS/CasperJS. I just want to start a session and verify that it's OK. Here's my code: var casper = require('casper').create({ verbose: true, logLevel: 'debug', ...
Jakshirak's user avatar
  • 111
1 vote
0 answers
42 views

jQuery functions not triggering in casperjs

Casperjs not triggering jQuery function or not even submitting the form or clicking submit button using these functions: casper.evaluate(function() { // form ID $('#credentials').submit(); }...
Waqar ahmad's user avatar
2 votes
4 answers
1k views

CasperJS continue inside for loop

I have copied this example in CasperJS. How would I implement a 'continue' command in combination? casper.then(function() { var current = 1; var end = 4; var something = true; for (;...
ProGirlXOXO's user avatar
  • 2,240
3 votes
0 answers
119 views

Casperjs + JQuery input text with NAME, not ID or CLASS

New to js, casperjs, jquery. I'm having trouble with input selector in JQuery + Casperjs. I'm trying to input text when I only have the NAME. It doesn't have an ID and the CLASS is the same as other ...
H Min's user avatar
  • 81
1 vote
1 answer
2k views

CasperJS/PhantomJS not clearing cache in thenOpen

I am having a caching problem in CasperJS. Here is my code snippet. var casper = require('casper').create({ verbose: true, logLevel: 'debug', pageSettings: { ...
Souvik's user avatar
  • 1,017

1
12 13
14
15 16
49