-1

I try to build a bot but to begin I need to setup chrome driver but it's already setup in my path

from selenium import webdriver
import os
import fxhash.constants as const
from webdriver_manager.chrome import ChromeDriverManager


class Fxhash(webdriver.Chrome):
    def __init__(self, driver_path=r"/Users/alexandrejacqueline"):
        self.driver_path = driver_path
        os.environ['PATH'] += self.driver_path
        super(Fxhash, self).__init__()

    def land_first_page(self):
        self.get(const.BASE_URL)

the error is :

os.path.basename(self.path), self.start_error_message) selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PATH.

Can somebody can help me ??
Best

Prophet
  • 32,350
  • 22
  • 54
  • 79
John Doe
  • 13
  • 3
  • Does this answer your question? [selenium - chromedriver executable needs to be in PATH](https://stackoverflow.com/questions/40555930/selenium-chromedriver-executable-needs-to-be-in-path) – JeffC Sep 03 '22 at 23:54
  • Nop work well on anaconda but not on pycharm – John Doe Sep 05 '22 at 15:42
  • The point of the link was that you need to add the `chromedriver.exe` to your path. – JeffC Sep 05 '22 at 18:35

1 Answers1

-1

Try to select the chrome driver by its absolute path.

For Example: driver-path=r„/Users/user/chrome_driver.exe

Jenby32
  • 13
  • 3
  • i did but dont work :( – John Doe Sep 03 '22 at 16:02
  • Work well on anaconda but not on pycharm – John Doe Sep 05 '22 at 15:42
  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Sep 07 '22 at 13:42