Questions tagged [phantomjs]

PhantomJS is a headless (GUI-less) WebKit with a JavaScript API. It has native support for various web standards: DOM handling, CSS selector, JSON, Canvas, and SVG.

PhantomJS is a headless (GUI-less) WebKit with a JavaScript API. It has native support for various web standards: handling, selector, , , and .

PhantomJS is a solution for headless testing of web-based applications, site scraping, page capture, renderer, converter and many other use cases. Since it isn't actually a browser, it is very fast.

PhantomJS was released January 23, 2011 by Ariya Hidayat after several years in development.

Related projects

PhantomJS has its own standalone execution environment, but it can be used through the wire protocol in various languages that provide bindings for . The tag should be used instead of [selenium] [webdriver] together.

is another standalone framework that is built on top of PhantomJS (and runs in PhantomJS).

PhantomJS needs some kind of bridge to be used directly from within a script. Popular bridges include phantom, node-phantom, nightmare ( version <1.8 used PhantomJS, now it's Electron), Horseman, navit, phridge, node-phantom-simple, jquery.go.js, SpookyJS (wrapper around CasperJS, which is a wrapper around PhantomJS), x-ray (use in addition ). Questions concerning those bridges should be tagged with as well as .

Documentation

7617 questions
3
votes
0 answers

Scraping a website with content added via javascript with Selenium in Python

I am trying to scrape data from a website using Selenium and phantomjs in python. However, this website is adding the data I'm interested in via javascript. Is there a way to ask Selnium to wait for the data before return it? So far, we've…
user3375577
3
votes
1 answer

With Travis-CI, how do I test chrome packaged apps?

I am writing a chrome packaged app, using angular JS. My setup uses grunt/karma/jasmine for building/unit testing, and everything was fine until I started using the chrome.* API. This of course was an issue as I had Travis-CI set up to use…
Zak Henry
  • 2,075
  • 2
  • 25
  • 36
3
votes
3 answers

How to configure resource handling by mocha-phatomJS? Error loading resource file:

I'm running test using mocha-phantomjs. While running an unit test, I'm not running http server, so my resources are not available through absolute urls (eg: /static/images/face.png), and I'm getting following output: %…
Robert Zaremba
  • 8,081
  • 7
  • 47
  • 78
3
votes
1 answer

How to install wraith on windows 7

Does anyone knows (maybe all relevant steps) how I can run/install Wraith on Windows 7? The documentation (http://bbc-news.github.io/wraith/index.html#Installation) is unfortunately very vague. Thanks in advance Martin
MRae
  • 267
  • 5
  • 15
3
votes
1 answer

How to set the browser language of PhantomJS

I'm using DalekJS with PhantomJS to test a web application. I have important assertions which depend on the browser language. And these fail if the language is not English. Any Ideas how I can set the default browser language of pantomjs?? Cheers…
izocan
  • 291
  • 1
  • 4
  • 16
3
votes
1 answer

'null' is not an object error when including jQuery into an opened page using PhantomJS

I'm trying out PhantomJS and wanted to use it to extract content from a webpage. However, I cannot inject jQuery using the following code. console.log('SSL support = ', require('system').isSSLSupported); var page =…
Roy
  • 880
  • 1
  • 12
  • 27
3
votes
4 answers

Checking email with CasperJS or PhantomJS

I'm looking to use CasperJS/PhantomJS to automate the testing of a project that extensively uses email as part of its process but I keep running into issues when I need check the content of emails in an automated way. These tools are very capable of…
Citricguy
  • 412
  • 7
  • 21
3
votes
1 answer

"IOError: [Errno 35] Resource temporarily unavailable" with PhantomJS, python, selenium, unittest

I'm having an issue with running unit tests using selenium and the PhantomJS driver. It seems to be related to resource contention for stderr/stdout in the PhantomJS process. The error is: $ python -m unittest…
Lucas Wiman
  • 10,021
  • 2
  • 37
  • 41
3
votes
1 answer

How to fill a select box, when select name and id include ":"

I have html code as below where the select names are with : (I have the need to fill more select included into the form mainForm):