2

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 <module>

from selenium import  webdriver

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

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

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.

2 Answers 2

2

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.

2
  • I tried the above steps and it still isn't working for me. Any thoughts? Jul 15, 2016 at 5:38
  • @ChandrasekarSreenivas You're getting an identical error as Ranadheer and Issac?
    – corsiKa
    Jul 15, 2016 at 18:53
0

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?

1
  • Well, the tests were working perfectly for Python3 before updating selenium.
    – Ranadheer
    Dec 10, 2013 at 9:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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