How To Resolve Selenium With Python: Typeerror: 'module' Object Is Not Callable
I am new to Selenium/Python and practicing few exercises. I am receiving below error when running my Selenium/Python program in pycharm. Please help. C:\Users\rk.marav\PycharmProje
Solution 1:
This error message...
driver = webdriver.ie(executable_path='C:/Selenium/Drivers/IEDriverServer.exe')
TypeError: 'module'object is not callable
...implies that the webdriver.ie is a module and is not callable.
@JohnGordon was pretty correct in his analysis. selenium.webdriver.ie.webdriver
is one of the Selenium related Python Module and is not callable.
To initiate an internet-explorer session through selenium-iedriver you need to replace the small i
with capital I
. So effectively your line of code will be:
driver = webdriver.Ie(executable_path=r'C:\Selenium\Drivers\IEDriverServer.exe')
You can find a relevant discussion in TypeError: 'module' object is not callable error with driver=webdriver(“C:\Python34\Lib\site-packages\selenium\webdriver\chromedriver.exe”)
Post a Comment for "How To Resolve Selenium With Python: Typeerror: 'module' Object Is Not Callable"