Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using Selenium with PyCharm CE

I'm trying to use Selenium with PyCharm CE. I have installed Selenium using pip install Selenium and I'm able to use it via the terminal however when I try to use it with PyCharm I get an import error

ImportError: cannot import name webdriver

Would anyone know why Selenium would work using the terminal but not even be able to import the module using PyCharm..?

Thanks,

like image 832
DavidJB Avatar asked Jun 20 '14 18:06

DavidJB


People also ask

Can I use PyCharm for selenium?

Steps to Install Selenium WebDriver Download and install Python from the following link “python”, from the “Downloads” tab, click on “Python for windows.” Download and Install PyCharm IDE for Python Developers from the link “ Pycharm link ”.

Can selenium be used with Python?

Selenium is an open source automation testing tool that supports a number of scripting languages like Python, C#, Java, Perl, Ruby, JavaScript, etc.

How do I add selenium to Python?

To install the Selenium bindings in our system, run the command: pip install selenium. As this is done, a folder called Selenium should get created within the Python folder. To update the existing version of Selenium, run the command: pip install –U selenium.

Is PyCharm used for automation?

Pycharm is an integrated development environment used explicitly for the Python programming language. In Software development, testing is crucial. Test Automation is the practice of running tests automatically, managing test data, and taking the results to improve the quality of the software.


1 Answers

This can be resolved in two ways:

  1. pip install selenium

  2. Go to Pycharm -> Perform (Cntrl + Alt + S) -> Select Project Interpreter -> Click on (+) icon -> Search for Selenium -> Select and Install Package -> Apply -> Ok

enter image description here

like image 54
Atul Avatar answered Sep 20 '22 13:09

Atul