Vipin Pulyani
Vipin Pulyani

Reputation: 127

from selenium import webdriver not working?

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

Upvotes: 3

Views: 14432

Answers (1)

unutbu
unutbu

Reputation: 879321

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

Upvotes: 2

Related Questions