Search code examples
internet-explorerjenkinsselenium-webdriverselenium-iedriver

IEDriverServer is not found even when it is in the path on jenkins slave


I've been trying to set up my jenkins slave to run our automated tests with IE. I've downloaded the IEDriverServer.exe and added its path to PATH environment variable. Below is my current path:

C:\IEDriver\IEDriverServer.exe;C:\Program Files\Java\jdk1.8.0_91;C:\Program Files\Java\jdk1.8.0_91\bin;C:\Python27;C:\Python27\Scripts;

But when I ran my jenkins job, it gave me an error of

WebDriverException: Message: 'IEDriverServer.exe' executable needs to be in PATH. Please download from http://selenium-release.storage.googleapis.com/index.html and read up at https://github.com/SeleniumHQ/selenium/wiki/InternetExplorerDriver

I've tried removing the .exe part of the path but it still doesn't work. Any ideas on what is causing this problem? It would be a great help. Thanks in advance!


Solution

  • You need to do 2 things:

    1. In the PATH, you need to add the path to the folder of the executable instead of: C:\IEDriver\IEDriverServer.exe;C:\Program Files\Java\jdk1.8.0_91;C:\Program Files\Java\jdk1.8.0_91\bin;C:\Python27;C:\Python27\Scripts; should be: C:\IEDriver;C:\Program Files\Java\jdk1.8.0_91;C:\Program Files\Java\jdk1.8.0_91\bin;C:\Python27;C:\Python27\Scripts;

    2. Restart jenkins. it reads the environment variables once on startup.