1

I've downloaded IEDriver and tested both 32 and 64bit versions (I am running 64bit Windows 7) and I included the folder containing the EXE to path in environment variables.

I've restarted Eclipse and my whole system but still get the exception

selenium.common.exceptions.WebDriverException: Message:
'IEDriver executable needs to be available in the path.
Please download from http://code.google.com/p/selenium/downloads/list
and read up at http://code.google.com/p/selenium/wiki/InternetExplorerDriver' 

Below is my test setup to launch IE:

def setUp(self):
    self.driver = webdriver.Ie()
    self.driver.implicitly_wait(30)
    self.base_url = "https://accounts.google.com/"
    self.verificationErrors = []
    self.accept_next_alert = True

I'm stumped. I've had it working previously but removed it and now want to put it back on my system. I'm using Python 3.3, Eclipse 4.2.2, Selenium 2.31 and IE 10.0.92

Any ideas?

Ripon Al Wasim
  • 36,924
  • 42
  • 155
  • 176
KPM
  • 737
  • 4
  • 11
  • 20

2 Answers2

4

How did you set your path?

For example, if your IEDriverServer.exe is in C:\, then you should add C:\ to your PATH, instead of C:\IEDriverServer.exe

EDIT: In your case, there is a semi colon before C:\IEDriver, which should be removed.

Then restart your Eclipse and try again.

EDIT: Could you please also try specify path to IEDriverServer.exe in the code?

from selenium import webdriver

driver = webdriver.Ie(r"C:\\IEDriver\\IEDriverServer.exe")
Yi Zeng
  • 32,020
  • 13
  • 97
  • 125
  • I have it in the folder `C:\IEDriver` and added it to the path as shown. – KPM May 22 '13 at 01:55
  • @Keith: Could you post your PATH? From command line, `echo %path%`. – Yi Zeng May 22 '13 at 01:56
  • definitely: `C:\Python33\;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;%JAVA_HOME%\bin;C:\Program Files (x86)\Google\Chrome\Application;C:\Users\User1\Downloads\windiff;C:\Program Files\TortoiseSVN\bin; C:\IEDriver` – KPM May 22 '13 at 02:00
  • 1
    @Keith: Answer update for another way. Note that there is a space before `C:\IEDriver` in your path, which could be the issue. – Yi Zeng May 22 '13 at 02:07
  • It ended up being the space after the last semicolon. D'oh! – KPM May 22 '13 at 13:22
1

It seems that newer Selenium 2 versions use different approach to communicate with IE than earlier. Just follow the instructions in the below link and you should be fine.

Driver executable must be set by the webdriver.ie.driver system property

Also Check the below point. I have encountered the same when I am Automating IE web application

On IE 7 or higher on Windows Vista or Windows 7, you must set the Protected Mode settings for each zone to be the same value. The value can be on or off, as long as it is the same for every zone. To set the Protected Mode settings, choose "Internet Options..." from the Tools menu, and click on the Security tab. For each zone, there will be a check box at the bottom of the tab labeled "Enable Protected Mode".

Community
  • 1
  • 1
vkrams
  • 7,267
  • 17
  • 79
  • 129
  • Hi Vikram, my confusion is that I did not have to initialize it like that previously. Also, I'm not too knowledgeable on Java, so I'm not sure how I would translate that over to Python. – KPM May 22 '13 at 01:51