I am a beginner and trying to run chrome web driver. I used the following code in google colab.
from selenium import webdriver
from bs4 import BeautifulSoup
import pandas as pd
options = webdriver.ChromeOptions()
options.add_argument('user-agent = Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2228.0 Safari/537.36')
driver = webdriver.Chrome(chrome_options=options, executable_path=r'C:\Users\write\AppData\Local\Programs\Python\Python39\chromedriver.exe')
driver.get('https://www.google.co.in')
It shows error in driver = webdriver.Chrome(chrome_options=options, executable_path=r'C:\Users\write\AppData\Local\Programs\Python\Python39\chromedriver.exe')
I have set the environment variable path for chromedriver as C:\Users\write\AppData\Local\Programs\Python\Python39\chromedriver
but it still shows FileNotFoundError.
WebDriverException: Message: 'C:\Users\write\AppData\Local\Programs\Python\Python39\chromedriver.exe' executable needs to be in PATH
Can anyone help me with this?