>>> import selenium
>>> selenium.webdriver
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: module 'selenium' has no attribute 'webdriver'
>>> from selenium import *
>>> webdriver
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'webdriver' is not defined
>>> from selenium import webdriver
>>> webdriver
<module 'selenium.webdriver' from 'C:\Python312\Lib\site-packages\selenium\webdriver\__init__.py'>
In this code why selenium doesn’t import webdriver unless if asked explicitly. According to my current understanding, if not asked, in python all classes/functions should load. then why webdriverd was not imported when we import all classes/functions from module unless asked explicitly.
I was expecting webdriver to be load when i load selenium module or all classes/functions from selenium module but webdriver wasn’t imported and is only loaded when asked explicitly.