AttributeError: module 'selenium.webdriver' has no attribute 'webdriver'

Started by Mau3re4, December 01, 2020, 04:35:19 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Mau3re4

I've installed selenium correctly as well as the chromium webdriver for selenium and I keep getting the following error

    Traceback (most recent call last):
  File "C:/Users/Turtle/PycharmProjects/SpotifyWebscraper/seleniumTest.py", line 3, in <module>
    driver = webdriver.chrome()
TypeError: 'module' object is not callable
here is my code:

from selenium import webdriver

driver = webdriver.chrome()
driver.get("htts://www.google.com")

print(driver.title)
print(driver.current_url)

driver.quit
I've checked in the folders correctly and the files seem to be in the right positions:

C:\Users\Turtle\AppData\Local\Programs\Python\Python38\Lib\site-packages\selenium-4.0.0a3-