Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"TypeError: 'module' object is not callable" with webdriver.chrome

from selenium import webdriver 

driver = webdriver.chrome("F:\\chromedriver.exe")

driver.get("https://www.nvidia.in/graphics-cards/geforce/pascal/buy/")
like image 479
Nishant Sharma Avatar asked Dec 04 '22 19:12

Nishant Sharma


2 Answers

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")
like image 78
spidey Avatar answered Dec 15 '22 01:12

spidey


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.

like image 36
Anand Joshi Avatar answered Dec 15 '22 01:12

Anand Joshi