I am using safari and selenium on python, I want to make a python selenium program that clicks a 'confirm'
button in an iframe, but it gives me an error or it doesn't work (the button and the iframe are in the viewport)
basically anyway I try, if the button is clicked with 'action chains' it gives me the same error (selenium.common.exceptions.MoveTargetOutOfBoundsException: Message:
) , or if the button is clicked normally it doesn't have any result (doesn't work)
Html - iframe
<iframe title="Confirm-box" scrolling="no" class="bottom" data-name="bottom">
</iframe>
Html - Button
<button type="submit" class="btn btn-submit" name="submitBtn">
Confirm
</button>
The iframe
iframe2 = driver.find_elements_by_tag_name('iframe')[1]
Scroll to the button
driver.execute_script("window.scrollTo(0, document.body.scrollHeight);")
time.sleep(2)
driver.switch_to.frame(iframe2)
double click the button
actionChains = ActionChains(driver)
element = driver.find_element_by_xpath("//button[contains(text(),'Confirm')]")
actionChains.double_click(element).perform()
Expected output:
button is clicked
Error (action-chains):
selenium.common.exceptions.MoveTargetOutOfBoundsException: Message: