I am trying to deploy selenium script using flask on heroku.
I added the following buildpacks
- https://github.com/heroku/heroku-buildpack-xvfb-google-chrome
- https://github.com/heroku/heroku-buildpack-chromedriver
And I also created config variables as:
CHROMEDRIVER_PATH = "/my-app/.chromedriver/bin/chromedriver"GOOGLE_CHROME_SHIM = "/my-app/.apt/usr/bin/google-chrome"
And below is the Python snippet for referring to chromedriver:
chrome_bin = os.environ.get('GOOGLE_CHROME_SHIM', None)
opts = ChromeOptions()
opts.binary_location = chrome_bin
browser = webdriver.Chrome(executable_path="chromedriver", chrome_options=opts)
But when i open my app following error occurred:
WebDriverException: Message: unknown error: no chrome binary at /tmp/build_4cef63dfa1c952837ceb30f2e894524a/.apt/usr/bin/google-chrome-stable`
PLEASE HELP!!!!