Running Selenium WebDriver script without installing the Selenium driver client for python will cause the python interpreter complain that no module named selenium was found.
>>> from selenium import selenium
Traceback (most recent call last):
File "test.py", line 1, in <module>
from selenium import selenium
ImportError: No module named selenium
Traceback (most recent call last):
File "test.py", line 1, in <module>
from selenium import selenium
ImportError: No module named selenium
The following steps will help you to solve the issue.
- Download the Selenium Client Drivers for Python. Current version while i am posting this tutorial is version 2.28.0 – selenium-2.28.0.tar.gz
- Unzip the file and browser to the following folder – \selenium-2.28.0.tar\dist\selenium-2.28.0\py\
- Copy the selenium folder. Yes, copy the entire folder.
- Browse to the python folder – C:\Python27\Lib\. I am using python 2.7, you might have different version. That’s OK.
- Paste the selenium folder you’ve copied just now to the Lib folder and you are done.
It should work now if you try to import selenium.
>>> from selenium import selenium
>>>
>>>
I am comparatively new to selenium and played a little with selenium IDE, and trying to do with selenium rc. I am baffled to use the scripting language there. Can you tell me what is the most used language in selenium across industries? And also I came across this course http://www.wiziq.com/course/12451-selenium-automated-web-browser-testing-for-web-applications os selenium automated web browser testing is this good? If someone does in Java and he joins a company where everyone does in ruby, then it’ll be a pain to learn ruby again. And also it would be great if you address any comparison about the available languages like (perl, python, ruby, java etc.) or tell me any other guidance would really appreciate help and also i would like to thank for all the information you are providing.
There are different languages adopted by diff industries and all i care about is how quick that i can get my test script ready and deploy to my test machine with minimum changes even if i choose to test it on different system.
Thaaaank yoouuuu it solved my problem!
Thanks!
Thanks for your great solution, it resolved my issue 🙂