I'm going through a list to click on the Alquilar button found in Alquilar
<ul id="vertical-operation-menu">
<li valorTipoHome="1" id="home-Venta" class="js-btn-home current vertical-operation-menu-btns">
<a href="#">Comprar</a>
</li>
<li valorTipoHome="2" id="home-Alquiler" class="js-btn-home vertical-operation-menu-btns">
<a href="#">Alquilar</a>
</li>
<li valorTipoHome="desarrollosURL" id="home-Emprendimiento" class="js-btn-home vertical-operation-menu-btns">
<a href="#">Emprendimientos</a>
</li>
<li valorTipoHome="homeComercial_grupo_4" data-tipo-propiedad-dfp="4,5,10,8,45" id="home-Comercial" class="js-btn-home vertical-operation-menu-btns">
<a href="#">Comercial</a>
</li>
<li valorTipoHome="4" id="home-Vacacional" class="js-btn-home vertical-operation-menu-btns">
<a href="#">Temporal</a>
</li>
</ul>
I am capturing it with XPATH in the following way
tipoOperacion = webdriver.find_element_by_xpath('//*[@id="home-Alquiler"]/a')
tipoOperacion.click()
but nothing happens
look at the data that I am capturing and return the name of the button
a = tipoOperacion.text
print(a)
ALQUILAR
But I can not click on the button
I add an answer to the question print(WebDriverWait(driver,10).until(EC.element_to_be_clickable((By.XPATH,"//a[text()='Alquilar']"))).text)
ALQUILAR
tipoOperacion = webdriver.find_element_by_id('home-Alquiler')
– Guy