# WebDriverException - error fails the test case

**URL:** <https://forum.robotframework.org/t/webdriverexception-error-fails-the-test-case/992>\
**Category:** Robot Framework\
**Created:** [20 November 2020 14:07 UTC](https://forum.robotframework.org/t/webdriverexception-error-fails-the-test-case/992 "2020-11-20T14:07:07Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![sanpry](https://avatars.discourse-cdn.com/v4/letter/s/e9c0ed/32.png) [@sanpry](https://forum.robotframework.org/u/sanpry)\
**Post date:** [20 November 2020 14:07 UTC](https://forum.robotframework.org/t/webdriverexception-error-fails-the-test-case/992/1 "2020-11-20T14:07:07Z")

</div>

WebDriverException: Message: ‘chromedriver’ executable needs to be in PATH.

i have defined the path under .bash\_profile.  
still, when i type the below command in the terminal - chromedriver PATH is not recognized.  
echo $PATH

Kindly advice.

---

<div class="post-metadata">

**Author:** ![HelioGuilherme66](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/helioguilherme66/32/34_2.png) [@HelioGuilherme66](https://forum.robotframework.org/u/HelioGuilherme66)\
**Post date:** [20 November 2020 14:15 UTC](https://forum.robotframework.org/t/webdriverexception-error-fails-the-test-case/992/2 "2020-11-20T14:15:52Z")

</div>

This is a Linux thing. You need to re-activate the .bash\_profile. You can do this by closing that terminal, and opening another, or by entering the command:

`source .bash_profile`

or its alias

`. .bash_profile`

---

<div class="post-metadata">

**Author:** ![sanpry](https://avatars.discourse-cdn.com/v4/letter/s/e9c0ed/32.png) [@sanpry](https://forum.robotframework.org/u/sanpry)\
**Post date:** [20 November 2020 14:30 UTC](https://forum.robotframework.org/t/webdriverexception-error-fails-the-test-case/992/3 "2020-11-20T14:30:03Z")

</div>

Still facing the same issue. Attached are the screenshots.  
 ![ChromedriverPathNOTSET](https://europe1.discourse-cdn.com/flex005/uploads/robotframework1/original/1X/0c0710923efc25bbda2df7165cf683a9fde3c1a0.png)

---

<div class="post-metadata">

**Author:** ![anton264](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/anton264/32/509_2.png) [@anton264](https://forum.robotframework.org/u/anton264)\
**Post date:** [24 November 2020 08:24 UTC](https://forum.robotframework.org/t/webdriverexception-error-fails-the-test-case/992/4 "2020-11-24T08:24:23Z")

</div>

You need to download the chromedriver and put it in one of the directories included in the path variable. You could for example put it in /usr/local/bin

---

<div class="post-metadata">

**Author:** ![warrensacko](https://avatars.discourse-cdn.com/v4/letter/w/8e7dd6/32.png) [@warrensacko](https://forum.robotframework.org/u/warrensacko)\
**Post date:** [25 January 2021 14:08 UTC](https://forum.robotframework.org/t/webdriverexception-error-fails-the-test-case/992/5 "2021-01-25T14:08:32Z")

</div>

> [@sanpry](#):
>
> ‘chromedriver’ executable needs to be in PATH.

You can test if it actually is in the [Python](http://net-informations.com/python/iq/default.htm) PATH, if you open a cmd and type in chromedriver and hit Enter. If Starting ChromeDriver 2.15.322448 is appearing, the PATH is set appropriately and there is something else going wrong. Then try the following:

**Download ChromeDriver**

Then you have multiple options:

- Add it to your system path
- Put it in the same directory as your python script
- Specify the location directly via executable\_path

`driver = webdriver.Chrome(executable_path='C:/path/to/chromedriver.exe')`
