Dear community
I’m trying to automate the editor of AEM, just I have an issue about the selectors inside of this iframe, so I would like if anyone knows how to works with type of iframe, due to the content is dynamic but the classes are always the same,
iframe = wait.until(EC.presence_of_element_located((By.TAG_NAME, 'iframe')))
driver.switch_to.frame(iframe)
wait = WebDriverWait(driver, 10)
lunch = wait.until(EC.presence_of_all_elements_located((By.CLASS_NAME, 'Dniwja_spectrum-Button Dniwja_spectrum-BaseButton Dniwja_i18nFontFamily Dniwja_spectrum-FocusRing Dniwja_spectrum-FocusRing-ring')))
I tried as well run a Javascript inside that find the element and click it, but it’s not working yet 🙁
driver.execute_script("""
elements = document.getElementsByClassName("Dniwja_spectrum-Button Dniwja_spectrum-BaseButton Dniwja_i18nFontFamily Dniwja_spectrum-FocusRing Dniwja_spectrum-FocusRing-ring");
console.log(elements);
//not defined elements[0], but the list of elements is printed on console
""")
I want to click “Launch” button
Any advice is welcome