Necesito saber como se puede de un iFrame Padre hacer switch a un iframe Hijo dentro del iFrame Padre en Selenium con Python3. Llevo mucho en Selenium, nunca tuve problemas hasta este momento.
Ejemplo:
HTML:
<iframe class="padre">
<iframe class="hijo"> </iframe>
</iframe>
PYTHON3:
iframePadre = WebDriverWait(self.web, 25).until(EC.element_to_be_clickable((By.XPATH, '//iframe[@class="padre"]')))
self.web.switch_to.frame(iframePadre)
# Aqui retorna error de localizacion del elemento.
iframeHijo = WebDriverWait(self.web, 25).until(EC.element_to_be_clickable((By.XPATH, '//iframe[@class="hijo"]')))
self.web.switch_to.frame(iframeHijo)
Este codigo en Python3, simplemente no funciona.