I'm writing a testcase with selenium driver and python,
after clicking a button, one div currently visible (contenetor of the button clicked) gets hidden, and other div previously hidden gets visible that contains some buttons that needs to be clicked to continue the flow
selenium detects as visible the secound div and the elements inside of it, but when I attempt to click a button, the exception is raisen
inside the second div is also a table that contains some checkboxes, i can even print the checkbox element but can't click on it
# Espera hasta que se encuentre visible el panel para selecciona sucursales visibles
try:
sucursalsTable = WebDriverWait(driver, 5).until(EC.presence_of_element_located((By.ID , 'sucursals-table')))
except TimeoutException:
print "Error al intentar seleccionar sucursales visibles"
tbody = sucursalsTable.find_element_by_tag_name("tbody")
rows = tbody.find_elements_by_tag_name("tr")
for row in rows:
cells = row.find_elements_by_tag_name("td")
checbox = cells[0].find_element_by_xpath("(//input[@type='checkbox'])") # la primera columna
print checbox
checbox.click()
pass
after run
the HTML
id="Sucursals-panel" is the second div
the same exception is raisen when I attempt to click a button inside the second div
I'll be very grateful if someone can give me a hand with this