I try clicking on the button search but this is not work. Here is the top code :
driver = webdriver.Chrome()
url = "https://www.flashscore.fr/"
driver.get(url)
the code that problem (first version):
buttonSearch = WebDriverWait(driver, 10).until(EC.element_to_be_clickable((By.CSS_SELECTOR, ".header__button--search")))
driver.execute_script("arguments[0].click();", buttonSearch)
This code does not what is asked but does not display an error.
So I have chosen a class in the class header__button--search named searchIcon___2C7g3ZD
Here it is:
buttonSearch = WebDriverWait(driver, 10).until(EC.element_to_be_clickable((By.CSS_SELECTOR, ".searchIcon___2C7g3ZD")))
driver.execute_script("arguments[0].click();", buttonSearch)
It display this error : selenium.common.exceptions.JavascriptException: Message: javascript error: arguments[0].click is not a function
Why is it not possible of click on the button search from page ?
EDIT : here is code HTML of button search on the page :
<div id="search-window" class="header__button header__button--search"><span class="searchIcon___HyESXZA"><svg class="searchIcon___2C7g3ZD "><title>Search</title><use xlink:href="/res/_fs/build/control-icons-symbols.0acb5c0.svg#icon--search"></use></svg></span></div>