Take the 2-minute tour ×
Software Quality Assurance & Testing Stack Exchange is a question and answer site for software quality control experts, automation engineers, and software testers. It's 100% free, no registration required.

I have recently updated selenium Webdriver to 2.38.1 and I am writing scripts using python. When I run the test case I have I get the following error

*Traceback (most recent call last):

File "C:/Users/xrankum/PycharmProjects/Automation Practice/Create Prepaid Data Susbcription.py", line 4, in

from selenium import  webdriver

File "C:\Python33\lib\site-packages\selenium\webdriver__init__.py", line 18, in from .firefox.webdriver import WebDriver as Firefox

File "C:\Python33\lib\site-packages\selenium\webdriver\firefox\webdriver.py", line 26, in from selenium.webdriver.firefox.extension_connection import ExtensionConnection File "C:\Python33\lib\site-packages\selenium\webdriver\firefox\extension_connection.py", line 22, in from selenium.webdriver.remote.remote_connection import RemoteConnection File "C:\Python33\lib\site-packages\selenium\webdriver\remote\remote_connection.py", line 21, in

import httplib

ImportError: No module named 'httplib'*

My tests were running perfectly until I updated to the new version of selenium.

Can anyone help me how to resolve this.

share|improve this question

Post is related to a rapidly changing event.

2 Answers 2

up vote 0 down vote accepted

I'm pretty sure it is supported.

I had the same error using python3, selenium 2.38.1, and ubuntu 13.10. Here is how I fixed it.

While investigating selenium suddenly not working after I upgraded it, I noticed that calling

pip3 list

showed an error as well. You can see a similar error as to what I had here: https://github.com/pypa/pip/issues/1093

So I uninstalled selenium

sudo pip3 uninstall selenium

Ran

sudo pip3 install -U distribute

Confirmed that pip3 list worked.

Installed selenium again

sudo pip3 install selenium

Now my test works. Hope that helps.

share|improve this answer
    
Awesome. I followed the above steps and it worked for me. Thank you –  Ranadheer Dec 10 '13 at 9:22

When looking at your post I noticed you are using Python 3.3. I'm not sure httplib is supported in 3.3.

On this 2.7 standard library page, httplib can be found.

On this 3.3 standard library page, httplib cannot be found:

Have you tried calling the same script from a Python 2.7 installation and received the same error?

share|improve this answer
    
Well, the tests were working perfectly for Python3 before updating selenium. –  Ranadheer Dec 10 '13 at 9:23

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.