I had a devil of a time figuring this out. It wasn't documented on the web anywhere I could find. I ended up reading the webdriver init.py to find out.

  • So no one else has to go through this hassle, this is how you do it: # Create a new instance of the Internet Explorer driver browser = webdriver.Ie() You'll also want to do this "Protected Mode must be set to the same value (enabled or disabled) for all zones" in IE's security settings if your on Vista or Windows 7.
    – Aaron
    Oct 19, 2011 at 21:23
  • I tried to post this as an answer, but I need 100 reputation points. That is a stupid requirement.
    – Aaron
    Oct 19, 2011 at 21:24
  • Aaron, if you have a complaint or a suggestion about StackExchange, please click the "meta" link (two links to the left of the search box in the upper right-hand corner of the page) and post it there, preferably as a question, e.g. "Why do I need 100 reputation points to post an answer to my own question?"
    – user246
    Oct 19, 2011 at 21:43
  • Aaron, I can understand your frustration. It does seem like a silly requirement, but a lot of new users on a SE site will post comments or edits as answers. So the reputation requirement is there to make sure someone has exposure to the community before they are allowed to fall into that trap. The unfortunate consequence of this (and other 'features' of its kind) is that it seems to punish those who actually read the FAQ and understand how to use the features available. Fear not, 100 rep is... pretty easy to get :-) and you'll be able to post it in no time.
    – corsiKa
    Oct 19, 2011 at 23:46
  • 1
    Fair enough. Yeah, I understand the need for such things. Some barrier to entry is always good for websites. Just frustrating when you are a "power user" and already know how things work. ;-)
    – Aaron
    Oct 20, 2011 at 1:31

4 Answers 4

from selenium import webdriver
driver = webdriver.Ie()

Also see comment above about "Protected Mode".


Just check this,



This is how it can be done -

  1. Download selenium from here https://pypi.python.org/pypi/selenium
  2. Assuming that you are on windows use - python setup.py install
  3. Download IEDriverServer.exe and put it in your path
from selenium import webdriver
from selenium.webdriver.common.keys import Keys

driver = webdriver.Ie("C:\\Python34\\IEDriverServer.exe")
//Your tests here

"from selenium import webdriver driver = webdriver.Ie()"

Eclipse is telling me that "the method IE is undefined for the type WebDriver"

  • This is not an answer to the question, if you are having problems then start a new question Aug 29, 2012 at 23:58
  • I agree with Phil, but will add that it sounds like the import might be failing. Make sure you have Selenium installed (e.g. pip install selenium).
    – Aaron
    Aug 30, 2012 at 22:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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