Reputation: 15
Im trying to use selenium in python 2.7 and when trying to import webdriver it gives me the error "ImportError: cannot import name webdriver" Ive had a search around and people seem to say updating it should sort the problem which i have tried using "pip install -U Selenium" which responds saying it is already upto date.
This is the full reply i get when running my script:
Traceback (most recent call last):
File "C:\Python27\Lib\site-packages\pythonwin\pywin\framework\scriptutils.py",
line 326, in RunScript
exec codeObject in __main__.__dict__
File "C:\Python27\selenium.py", line 1, in <module>
from selenium import webdriver
File "C:\Python27\selenium.py", line 1, in <module>
from selenium import webdriver
ImportError: cannot import name webdriver
Upvotes: 1
Views: 11260
Reputation: 5819
I think looking at what you have (although python is pretty far down my known languages list) that the problem is related to the wrong selenium being imported. Have a look at:
Trying to use Selenium 2 with Python bindings, but I'm getting an import error
Upvotes: 2