from selenium import webdriver not working?


Question

I downloaded the Selenium Python package including server, but I get an error:

File "<pyshell#6>", line 1, in <module>
from selenium import webdriver
ImportError: cannot import name webdriver
1
3
3/8/2013 9:29:58 PM

There are two versions of Selenium. There is a Java server, which you can interface with Python using Selenium RC, and there is a newer Selenium Webdriver with which you can write stand-alone scripts (without running the Java server)

It sounds like you might have downloaded the Selenium RC, but not Selenium Webdriver. For from selenium import webdriver to work, you must install Selenium Webdriver.

To do that run

pip install -U selenium
3
1/17/2013 6:59:04 PM

Licensed under: CC-BY-SA with attribution
Not affiliated with: Stack Overflow
Icon