casper evaluate modifying global var

I'm new to CasperJS and I'm having issues with the evaluate() function. I have the following sample code: var results = []; // a global var var links = [link1, link2 ,....]; //a list of urls var...

How can I access the canvas element without an id?

Using CasperJs, I'm trying to do some testing on canvas, by grabbing it and using canvas.toDataURL();. However, the canvas does not have an id, the code looks something like this: <div id= 'derp'...

problem CasperJS POST via AJAX not working

I'm working on a scraper of my bank statements with CasperJS, so far I've managed to login and get to the statements page. I accomplished to get the table with the first page of the statement, but...

Headless Browser and scraping - solutions

I'm trying to put list of possible solutions for browser automatic tests suits and headless browser platforms capable of scraping. BROWSER TESTING / SCRAPING: Selenium - polyglot flagship in...

Casperjs Login will not work keep getting resubmission error

Here is my test.js file which I execute with command sudo casperjs test test.js > 2.txt: casper.start('https://www.bt.com/wifi/secure/statuscheck.do', function()...

save the exec output into a file

I'm running a shell command ( its a web scraper ) via php exec ( although, i have tried system and passthru as well) and i need to save the results in a file, (preferably .txt),The output data is...

Sending array via JavaScript to nodejs

I have 2 working scripts which I am trying use in conjunction with each other first is my JavaScript: <script type="text/javascript"> function textareaToArray(t){ return...

How to fill a form by id of input in Casperjs?

I am using Casperjs 1.1.0-beta3 and trying to fill a form by an 'id' selector. I have successfully have used "input[name='userID']" but using an 'id' as a selector always fails with an error...

PhantomJS/CasperJS IDE Helper

Is there any way to get IDE support for CasperJS functions? I am currently using PhpStorm, but also tried in netbeans, it won't know which functions are defined. It is quite irritating that I get...

Maven Compilation Issue: The system is out of resources

I am aware that there are many who faced the same issue as I have. I am facing difficulty compiling it with the Maven Compiler Plugin using eclipse. I almost tried all the trouble shooting...

SlimerJS extensions.getAddons.cache.enabled

I'm having an issue running SlimerJS through CasperJS, I get the next message "1414441945905 addons.repository WARN cacheEnabled: Couldn't get pref: extensions.getAddons.cache.enabled". I have a...

Phantomjs: Function sending a keypress event doesn't work with enter

I am trying to automate some things only with phantomjs. Doing the same work with casperjs works but the challenge is to get it working only with phantomjs. I want to press enter in a normal...

Cannot execute same CSS Path in CasperJS

I'm using casperjs for do some web scraping. This is the problem, I need to get value from datepicker and then pick one date by this css path code : #datepicker_div >...

Phantomjs does not open web page

I have started testing campus2020 site with casperjs (1.1.0-beta3) + phantomjs (1.9.8). And faced with the problem that site is not opening but instead tests just freeze. I have taken script...

Problem with scraping angularjs website? using file_get_contents

I am scraping an angularjs website using file_get_contents as well as using curl, but as an output I get incomplete html page. When I reviewed the html file, than I found that the content of div...

How to Fetch ajax loaded website with CasperJS

Hello i am trying to get a betting coupon from the web via scraping with casperjs and phantomjs. The page loads via ajax and prints a table with the data .The web site is :...

Where is Casper.js' sendEvent defined?

I'm trying to figure out how exactly is Casper.js using underlying Phantom.js to move the mouse. I found that casper.page.sendEvent() is responsible but where is sendEvent defined and how does it...

Fill an input field that is not of type text and that triggers events in CasperJS

I have to do automated tests on a website and I want to use CasperJS to learn. For proprietary reasons I can not give too much code. Here is the example of the input that I am trying to...

Installing PhantomJS on Mac

I'm trying to install PhantomJS on my Mac (Yosemite). I did the following: npm install phantomjs Then I did: npm install phantomjs-prebuilt Both of which appear in my node_modules. But when I...

CasperJS Invoke Javascript function on browser console

I am trying to invoke a Javascript method using CasperJS. The web page simply consist of a link that allows me to change back to my default country. <a id="defaultCountry"...

How to automate keyboard events like "ctrl f" or "ctrl s" etc in javascript

I want to automate keyboard events actions like Ctrl+F or Ctrl+s or Alt+Shift down etc. using Javascript. How to do it? Please help.

How to: Select Radio Option Button in iFrame Using CasperJS?

I am new to JavaScript, new to CasperJS, etc. However, I have watched a couple of YouTube videos and worked through some examples using CasperJS. From this vantage I thought I had a fairly good...

Why does this code error on Lambda when wrapped inside exports.handler?

I'm using this casperjs nodejs app: https://github.com/narainsagar/node-casperjs-aws-lambda I've gotten my code to work locally and when uploaded to Lambda, but I need to wrap my code inside...

CasperJS, scrape content in the target page with javascript disable

I want get the content of attribute 'src' of all image from a page of my website. I can do this with this simple code : var x = require('casper').selectXPath; var casper =...

tsconfig.json - add filesGlob entries for directories above tsconfig file

I am trying to use Typescript to create CasperJS front end tests on an existing Zend Framework 2 project. ZF2 project structure is setup like this: project - .composer - config - data - module --...

How to scrape Price from a site that has a changing structure?

I want to scrape the pricing data from an eCommerce site called flipkart, I tried using Beautifulsoup with casperjs(nodejs utility) and similar libraries but none of them is good enough. Here's...

spawn casperjs ENOENT error on AWS elastic beanstalk

I am trying to run a casper scraper on nodejs using SPOOKY. The scraper works fine when I run it on the localhost but gives the error below when I deploy the project on AWS elastic beanstalk...

Amazon sellercentral login through PHP and Curl

I am working on web scraping after login to Amazon seller central account but while executing my code, it always return me an error "There was a problem Enter your email or mobile phone...

Saving scraped data to mysql database through phantomjs and casperjs

Hi I am working on a web scraper, first I was trying to scrape using php CURL, but then I faced a problem that I wasn't able to scrape the sites which loads through AJAX and then I shifted to...

console.log message is truncated

I'm new to puppeteer. I used to have PhantomJS and CasperJS but while setting a newer server (freebsd 12) found out that support for PhantomJS is gone and CasperJS gives me segmentation faults. I...