Questions tagged [phantomjs-node]

The wrapper for PhantomJS library. Allows to execute JavaScript code from the application instead of passing a custom script for PhantomJS.

The wrapper for PhantomJS library. Allows to execute JavaScript code from the application instead of passing a custom script for PhantomJS.

phantomjs-node's Github page

13 questions
2
votes
0 answers

phantomjs and simple examples gives TypeError: Attempting to change the setter of an unconfigurable property

I'm working my way through the phantomjs examples but TypeError: Attempting to change the setter of an unconfigurable property. errors keep popping up. I wanted to pipe returned values to files but they are full of these error messages even with…
Rick T
  • 3,125
  • 9
  • 43
  • 101
2
votes
2 answers

How do I install fonts in the IBM Cloud nodejs runtime? (cloud foundry)

I use the html-pdf component to generate pdf reports in my nodejs app and in order to properly embed custom fonts in the pdf document, these fonts must be installed in the server, in this case, in the IBM Cloud nodejs runtime. How do I do that?
Leo
  • 723
  • 4
  • 27
1
vote
2 answers

How to decrease the time taken by html-pdf for report generation?

I'm dealing with high volume data. I want to generate a PDF report which contains 1 year data. I'm using html-pdf to do that. The problem is that it is taking around 20 minutes to generate the PDF. Can I decrease it? I don't want to make my user…
Sanjay
  • 71
  • 10
1
vote
3 answers

Node js and Phantom js

I'm looking to scrape a page as an exercise to learn phantomjs however I'm having an issue currently. The image loading is deferred so I'm trying to figure out how I can get phantom js to scroll down and wait for the images to load. SCrolling to the…
1
vote
0 answers

Phantom.js not loading content in $(document).ready

I am using PhantomJS to screenshot my page but I ran into some problems. My page content is 90% rendered via jQuery as the data is retrieved from Firebase. I am using phantomjs-node as I am building my web via Nodejs. I would want to take a…
1
vote
1 answer

How can I change the screen resolution of PhantomJS?

In any way I can not find a question concerning change of the sanction of the screen. There will always be 1024x768. Changing the viewportSize does not change the screen resolution, by itself. I checked the resolution here: link This is for…
Noneme
  • 23
  • 4
0
votes
0 answers

PhantomJS Record User Session Video

I'm developing an in-house solution to record the users sessions activity in the web pages visited by them. By activity I mean mouse movement and clicks. I am already recording that info with the timestamp when the events happened but I would like…
Marrone
  • 437
  • 1
  • 6
  • 17
0
votes
2 answers

Installing phantomjs using npm error

I'm doing a unit testing for my javascript codes. I prefer to use a headless browser for easier running. It goes well when I installed some dependencies but when I install phantomjs, it has an error. C:\Phantomjs>npm install -g phantomjs npm WARN…
R.A.P
  • 9
  • 1
  • 6
0
votes
1 answer

NodeJS: Returning an array to next promise asynchronously

I am familiar with asynchronous programming and using callbacks, however I am not as knowledgeable in using promises. I have the following code: page.evaluate(function() { elements.push(document.getElementById('form_username')); …
0
votes
1 answer

Node.js & co - avoid mixing promises and event callbacks

Recently, I have been experimenting with the phantomjs-node library. The thing I wanted to achieve was basically to create a dynamic web-page template, employ the phantomjs-node library to "run" it, and finally extract some data from the rendered…
ewcz
  • 11,464
  • 1
  • 19
  • 42
0
votes
1 answer

how can I store cookies with node phantom?

Im trying to store cookies after I get from website.But, when I create a global variable and I try to store it on the variable it return as undefined or when I try to create a file with the cookies on it, it return undefined as well, but I can print…
Tiago Castro
  • 361
  • 2
  • 15
0
votes
1 answer

How pass data to page.eveluate function?

Consider code from node-phantom: page.evaluate(function() { return document.getElementById('foo').innerHTML; }).then(function(html){ console.log(html); }); The funciton is executed directly in html page, so adding a parameter like…
Cherry
  • 25,428
  • 40
  • 160
  • 286
-1
votes
1 answer

How can I access to page.open function result? phantomjs

How can I get access to the result that is returned from the callback? var page = require('webpage').create(); page.open('http://example.com', function (status) { // code return result; }
DeadUnicorn
  • 163
  • 1
  • 10