I'm new to selenium just started learning it using freecodecamp and started using selenium downloaded selenium using the following command in python
pip install selenium
And I manually installed chrome web driver. Written the code as:
import os
from selenium import webdriver
os.environ["PATH"] +=r"C:/seleniumDrivers" #where the chrome driver is installed
driver = webdriver.Chrome()
The following error occured when I run this:
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
But if I modified code a bit:
import os
from selenium import webdriver
driver = webdriver.Chrome("C:/seleniumDrivers/chromedriver.exe)
A pop website appeared and closes immediately. Can anyone please suggest what should I do.