title: Selenium web driver can't open browser on Heroku
body: <p>I have an Node.js app with a Python script that uses Selenium webdriver.
  When I ran it locally everything is working as expected. When deployed to Heroku the web browser fail to open from app.</p>
  
  <p>Here is my code:</p>
  
  <pre><code>browser = webdriver.Firefox(executable_path='C:\\path\\to drivers\\geckodriver.exe')
  browser.minimize_window()
  browser.maximize_window()
  browser.get('http://www.google.com')
  </code></pre>
  
  <p>The browser console error:</p>
  
  <blockquote>
    <p>HTTP500: SERVER ERROR - The server encountered an unexpected condition that prevented it from fulfilling the request.</p>
  </blockquote>
  
  <p>Update:
  Based on suggestion from Chris I updated the code to:</p>
  
  <pre><code>browser = webdriver.Chrome()
  </code></pre>
  
  <p>and added google-chrome buildpack.
  <a href="https://i.stack.imgur.com/0B8EP.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/0B8EP.png" alt="enter image description here"></a> </p>
  
  <p>But still can't open browser when running web version.
  Heroku log mentions PATH. But drivers are in PATH. everything works locally.
  Obviously, I am missing something.</p>
  
  <blockquote>
    <p>2019-08-07T11:27:54.690913+00:00 app[web.1]: { Error: selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PATH. Please see <a href="https://sites.google.com/a/chromium.org/chromedriver/home" rel="nofollow noreferrer">https://sites.google.com/a/chromium.org/chromedriver/home</a></p>
  </blockquote>
  
  <p>Any guidance is greatly appreciated.</p>