4 ms·
I would think PhantomJS, being a headless, scriptable browser (plus built on WebKit so closer rendering to the most popular browser), would be the "first port o
by extra88 10y ago
I would think PhantomJS, being a headless, scriptable browser (plus built on WebKit so closer rendering to the most popular browser), would be the "first port of call."
- vacri 10y agoWhy use a fake browser when you can use a real one? It's also harder to inspect the actual rendering of an invisible browser. Near the top of a google search for 'phantomjs vs selenium', we have folks on HN complaining about phantomjs https://news.ycombinator.com/item?id=8418071 https://news.ycombinator.com/item?id=8418071
- bad_login 10y agoI have used phantomjs (with casperjs) for scrapping a website, it was complete nightmare. 1. It use javascript to script so writting sequential code wasn't possible so the code ended up using continuation passing style. 2. The very first example snippet on the front page don't work in the repl (https://github.com/ariya/phantomjs/issues/11180 https://github.com/ariya/phantomjs/issues/11180). So the repl is useless. 3. When an error occur in your script (not the one on the webpage) there is no message anywhere no matter what you do. My mistake was to continue with phantomjs the hype around made me think others options would have been worst. I have used selenium+firefox+php to do a quick test it was wayyyy better, just for n°1 using sequential php remove a lot headaches.