Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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
like image 870
Vipin Pulyani Avatar asked Mar 26 '26 03:03

Vipin Pulyani


1 Answers

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
like image 186
unutbu Avatar answered Mar 27 '26 17:03

unutbu