Selenium/PhantomJS raises error Selenium/PhantomJS raises error selenium selenium

Selenium/PhantomJS raises error


Make the path in raw string, add 'r': 

driver = webdriver.PhantomJS(executable_path=r'D:\Python\phantomjs-2.0.0-windows\bin\phantomjs.exe')


For simplicity's sake place the executable in the same directory as your script:

driver = webdriver.PhantomJS() # now there's no need for a path


For me none of the above solved the problem; I found the code:

driver = webdriver.PhantomJS()

Will only work for root...