I have the following bit of code in python: it opens firefox on a specified page, closes the "accept cookies" window, and scrolls down to click on a button "Carica Altro". When I click the button I get : ElementNotInteractableException: Message: Element <button class="button button--primary medium expanded button--login" type="submit"> could not be scrolled into view
but in fact it is visible, because I see it in the UI (as in the picture).

from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.firefox.options import Options as FirefoxOptions
from selenium.webdriver.common.action_chains import ActionChains
import time
my_url='https://www.raiplay.it/programmi/winxclub/episodi/stagione-5'
def main():
options = FirefoxOptions()
browser = webdriver.Firefox(options=options)
browser.implicitly_wait(10)
browser.get(my_url)
wait = WebDriverWait(browser, 30)
try:
wait.until(EC.element_to_be_clickable((By.CLASS_NAME, "as-oil__btn-primary.as-js-optin"))).click()
print('Clicked successfully')
except:
print('Could not click')
pass
l =browser.find_element(By.CLASS_NAME,"button.button--primary.medium.expanded")
browser.execute_script('window.scrollBy(0, 1500)')
time.sleep(10)
l.click()
return
button--primaryand click on the last one. If that doesn't work, try clicking on a containing or contained element (like thedivor thea). That's how I've solved this sort of problem in the past