from selenium import webdriver
driver = webdriver.chrome("F:\\chromedriver.exe")
driver.get("https://www.nvidia.in/graphics-cards/geforce/pascal/buy/")
In python, letter 'c' will be in upper case in the function chrome().
INCORRECT
import webdriver
driver = webdriver.chrome("F:\\chromedriver.exe")
PROPER:
from selenium import webdriver
import selenium
driver = webdriver.Chrome("F:\\Chromedriver.exe")
from selenium import webdriver
import selenium
driver = webdriver.Chrome()
driver.get("http://www.python.org")
C should be capital in webdriver.Chrome()
Also, the path for driver is not required. The driver is already installed on the computer.
Yor are miss spell the class name. It is not chrome(), Chrome().
webdriver.chrome("F:\\chromedriver.exe")
to
webdriver.Chrome("F:\\chromedriver.exe")
or
webdriver.Chrome()
from selenium import webdriver
import selenium
driver = webdriver.Chrome(r"C:\Users\007\Desktop\chromedriver_win32\chromedriver.exe")
driver.get("http://www.python.org")
Can you do this to see if it's installed?
import selenium
print selenium.__version__
As for the
driver = webdriver.chrome("F:\\chromedriver.exe")
You can just use:
driver = webdriver.Chrome();
in Chrome the c has to be a capital letter.
first install webdriver manager and write the below code pip install webdriver-manager
from webdriver_manager.chrome import ChromeDriverManager
from selenium import webdriver
driver = webdriver.Chrome(ChromeDriverManager().install())
driver.get("desired url")
You can use this -
from selenium
import webdriver
from selenium.webdriver.chrome.service
import Service
service_obj=Service()
driver= webdriver.Chrome(service=service_obj) driver.get("https://www.linkedin.com/feed/?trk=")
© 2022 - 2024 — McMap. All rights reserved.
?
– Restrained