I am getting below error while executing tests on PhantomJS.
Traceback (most recent call last):
File "C:\Python34\lib\site-packages\selenium\webdriver\common\service.py", lin
e 64, in start
stdout=self.log_file, stderr=self.log_file)
File "C:\Python34\lib\subprocess.py", line 848, in __init__
restore_signals, start_new_session)
File "C:\Python34\lib\subprocess.py", line 1104, in _execute_child
startupinfo)
FileNotFoundError: [WinError 2] The system cannot find the file specified
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "barchart.py", line 7, in <module>
driver = webdriver.PhantomJS(r'C:\Users\abdurrub\Anaconda3\Scripts\phantomjs
.exe',service_args=['--ignore-ssl-errors=true', '--ssl-protocol=any'])
File "C:\Python34\lib\site-packages\selenium\webdriver\phantomjs\webdriver.py"
, line 52, in __init__
self.service.start()
File "C:\Python34\lib\site-packages\selenium\webdriver\common\service.py", lin
e 71, in start
os.path.basename(self.path), self.start_error_message)
selenium.common.exceptions.WebDriverException: Message: 'phantomjs.exe' executab
le needs to be in PATH.
Exception ignored in: <bound method Service.__del__ of <selenium.webdriver.phant
omjs.service.Service object at 0x02104890>>
Traceback (most recent call last):
File "C:\Python34\lib\site-packages\selenium\webdriver\common\service.py", lin
e 163, in __del__
self.stop()
File "C:\Python34\lib\site-packages\selenium\webdriver\common\service.py", lin
e 135, in stop
if self.process is None:
AttributeError: 'Service' object has no attribute 'process'