PhantomJS

21 views
Skip to first unread message

Филипп Кац

unread,
May 6, 2015, 1:26:23 PM5/6/15
to scrap...@googlegroups.com
Just realised there is a preinstalled selenium in my environment (I use python)
however I wasn't able to setup PhantomJs as a webdriver with it.

Is phantomjs preinstalled? If no, Is there any chance it will be installed?
Also, maybe there is some other type of headless 'browser' installed instead?

Thank you in advance!

Steven Maude

unread,
May 7, 2015, 5:34:01 AM5/7/15
to scrap...@googlegroups.com
Hi, you'll need to SSH in to the box and do: npm install phantomjs

By default, this should be installed into
/home/node_modules/phantomjs/lib/phantom/bin/phantomjs

so in Python you'll need to do this to get started:

from selenium import webdriver

driver =
webdriver.PhantomJS(executable_path='/home/node_modules/phantomjs/bin/phantomjs')

Hope that helps,

Steve
Reply all
Reply to author
Forward
0 new messages