hello i have a problem i have a python script that works on my machine but does not work on heroku. it is a web scraper so locally it works but when i deploy it on heroku i get the no such element exeption unable to locate element, can you help me
here is the chrome options that i set
opt = Options()
opt.add_argument("--headless")
opt.add_argument("--window-size=5000,2800")
opt.add_argument('--disable-gpu')
opt.add_argument('--no-sandbox')
opt.add_argument(' --disable-dev-shm-usage')
opt.add_argument('--remote-debugging-port=9222')
chrome_bin = os.environ.get('GOOGLE_CHROME_PATH', None)
opt.binary_location = chrome_bin
driver = webdriver.Chrome(executable_path= CHROMEDRIVER_PATH, options=opt)
ERROR:telegram.ext.dispatcher:No error handlers are registered, logging exception.
Traceback (most recent call last):
File "/app/.heroku/python/lib/python3.6/site-packages/telegram/ext/dispatcher.py", line 425, in process_update
handler.handle_update(update, self, check, context)
File "/app/.heroku/python/lib/python3.6/site-packages/telegram/ext/handler.py", line 145, in handle_update
return self.callback(update, context)
File "script.py", line 188, in send
l = ottieni_link((update.message.text).lower())
File "script.py", line 49, in ottieni_link
popup = driver.find_element_by_class_name("closePopup")
File "/app/.heroku/python/lib/python3.6/site-packages/selenium/webdriver/remote/webdriver.py", line 564, in find_element_by_class_name
return self.find_element(by=By.CLASS_NAME, value=name)
File "/app/.heroku/python/lib/python3.6/site-packages/selenium/webdriver/remote/webdriver.py", line 978, in find_element
'value': value})['value']
File "/app/.heroku/python/lib/python3.6/site-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute
self.error_handler.check_response(response)
File "/app/.heroku/python/lib/python3.6/site-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"css selector","selector":".closePopup"}
(Session info: headless chrome=86.0.4240.183)