I want to press buttons using selenium, i faced an issue yesterday where i couldn't and simply turned out that my button is inside an iframe circling the entire webpage. this fixed it:
from time import sleep
driver.switch_to.frame(driver.find_element_by_id("includedPage"))
sleep(10)
element = driver.find_element_by_xpath("//input[contains(@id, 'workbenchLst:j_id_id507') and @value='Add']")
element.click()
after clicking on it i wanted to do same with other buttons on the page after but couldn't i just keep getting Unable to locate element
for the iframe and all other elements in the page( that page has an iframe too inside a td like this):
<td id="rightTdId">
<iframe id="includedPage" style="width:100%;" onload="reRenderReportLOV();;tickleSession('pageNavigation:sessionLink');disableContextMenu();showHidPanelMenu('hide','leftMenuj_id_1');" name="includedPage" src=".." marginheight="0" marginwidth="0" height="531" frameborder="0"></iframe>
</td>
how can i get my buttons in that page and disable iframe's effect affect after locating it?