I\'m trying to run PhantomJS driver in Python but I\'m getting error. I\'ve read that I should pass the whole path as an argument but it di
For me, this works fine and also don't have to specify path for PhantomJS You need to install pip install phantomjs-binary binary package using pip
pip install phantomjs-binary
it will download a package of approx 60MB. and contains PhantomJS for windows, mac, and Linux as per the running environment. after that, you can use it
from selenium import webdriver
from phantomjs_bin import executable_path
driver = webdriver.PhantomJS(executable_path=executable_path)