title: Unable to load chrome webdriver error says DeprecationWarning: executable_path has been deprecated, please pass in a Service object
body: <p>I have installed python, python-pip and selenium package from pycharm (I am using Manjaro Linux OS) for automation but I am unable to load chrome webdriver gives error which is attached herewith. I downloaded same version chromedriver file as is of my current chrome browser and pasted into project folder also the same file is present in /usr/local/bin/chromedriver. Don't have any idea why it is still giving me error. Help will be appreciated. Thanks.</p>
  <p>I tried to run these lines of code:</p>
  <pre><code>from selenium import webdriver
  browser = webdriver.Chrome(executable_path='./chromedriver')
  browser.get('www.google.com')
  </code></pre>
  <p>and I get these errors:</p>
  <pre><code>/home/abubakar/PycharmProjects/pythonProject_01/main.py:2: DeprecationWarning: executable_path has been deprecated, please pass in a Service object
    browser = webdriver.Chrome(executable_path='./chromedriver')
  Traceback (most recent call last):
    File &quot;/home/abubakar/PycharmProjects/pythonProject_01/venv/lib/python3.10/site-packages/selenium/webdriver/common/service.py&quot;, line 71, in start
      self.process = subprocess.Popen(cmd, env=self.env,
    File &quot;/usr/lib/python3.10/subprocess.py&quot;, line 969, in __init__
      self._execute_child(args, executable, preexec_fn, close_fds,
    File &quot;/usr/lib/python3.10/subprocess.py&quot;, line 1845, in _execute_child
      raise child_exception_type(errno_num, err_msg, err_filename)
  FileNotFoundError: [Errno 2] No such file or directory: './chromedriver'
  
  During handling of the above exception, another exception occurred:
  
  Traceback (most recent call last):
    File &quot;/home/abubakar/PycharmProjects/pythonProject_01/main.py&quot;, line 2, in &lt;module&gt;
      browser = webdriver.Chrome(executable_path='./chromedriver')
    File &quot;/home/abubakar/PycharmProjects/pythonProject_01/venv/lib/python3.10/site-packages/selenium/webdriver/chrome/webdriver.py&quot;, line 69, in __init__
      super().__init__(DesiredCapabilities.CHROME['browserName'], &quot;goog&quot;,
    File &quot;/home/abubakar/PycharmProjects/pythonProject_01/venv/lib/python3.10/site-packages/selenium/webdriver/chromium/webdriver.py&quot;, line 89, in __init__
      self.service.start()
    File &quot;/home/abubakar/PycharmProjects/pythonProject_01/venv/lib/python3.10/site-packages/selenium/webdriver/common/service.py&quot;, line 81, in start
      raise WebDriverException(
  selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PATH. Please see https://chromedriver.chromium.org/home
  </code></pre>
  <p>Process finished with exit code 1</p>