Stack Overflow Asked by Proxyfiber on January 18, 2021
My code:
#!/usr/bin/python3
from selenium import webdriver
driver=webdriver.Firefox(executable_path=r'/usr/local/bin/geckodriver')
driver.get('http://www.python.org')
produces the following error:
ERROR : Message: Can not connect to the Service /usr/local/bin/geckodriver
My settings:
How can I fix this?
Move geckodriver file to /usr/bin and than change code as follow.
from selenium import webdriver
from selenium.webdriver.firefox.options import Options
options = Options()
options.headless = True
driver = webdriver.Firefox(options=options)
Hope it helpful. It works in my side.
Answered by Xueming Zheng on January 18, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP