Reputation: 5087
I'm using a script which runs with Python 3.4 and the selenium library, and I'm getting this error
PhantomJS with Selenium error: Message: 'phantomjs' executable needs to be in PATH
which has a solution here
PhantomJS with Selenium error: Message: 'phantomjs' executable needs to be in PATH
but when I try to implement the solution the path to C:\DriverPath\Bin\ is wrongly brought, when I print the property which has it (self.path), it prints
with that dot over there instead of C:\DriverPath\Bin\ and it keeps triggering "PhantomJS with Selenium error: Message: 'phantomjs' executable needs to be in PATH" . Any idea what could it be
Upvotes: 0
Views: 75
Reputation: 193338
Working with Selenium 3.4.3 & PhantomJS 2.1.1 with Python 3.6.1 the following lines of code initializes the PhantomJS Driver perfecto:
driver = webdriver.PhantomJS(executable_path="C:\\Utility\\phantomjs-2.1.1-windows\\bin\\phantomjs.exe")
driver.get("https://www.booking.com/")
Let me know if this Answers your Question.
Upvotes: 1