Basically I need to click on a button, which is inside a frame on a webpage. I have tried:
1) Switching to frame, which works fine, doesn't return any errors:
driver.switch_to.frame(driver.find_element_by_css_selector('#iframe'))
3) Adding time delay of 20 seconds, which doesn't change the result as it just times out in the end:
WebDriverWait(driver, 20).until(EC.element_to_be_clickable((By.CSS_SELECTOR, "dx-button"))).click()
I believe the CSS element's name is correct as I have copied it using Developer Mode -> Copy Selector.
Is there anything else that I can do in order for selenium to find this CSS element?
Error before adding time delay:
selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"css selector","selector":"dx-button"}
Error after adding time delay:
selenium.common.exceptions.TimeoutException: Message:
Thank you.