I'm starting with Selenium and have a question, basically I don't understand why when I switch to an iframe and select one of the elements I constantly get:
selenium.common.exceptions.NoSuchWindowException: Message: no such window
(Session info: chrome=84.0.4147.89)
This is the relevan code, firstly I click on some element of the DOM containing the iframe that actually updates the iframe content and then select the iframe, switch to it and then select the element I want inside the HTML content of the iframe
# Select the item on main DOM that will udpate the iframe contents
bandeja = driver.find_element_by_xpath("//*[@id='sm20']")
bandeja.click()
# Tried sleeping, but also WedDriverWait to no avails...
time.sleep(3)
# Get the frame that actually has the content
frame = driver.find_element(by=By.NAME, value="ifrInterior")
driver.switch_to.frame(frame)
# Select the element inside the iframe and click
equipo = driver.find_element_by_xpath("//input[@name='gestionesPropias_Equipo']")
equipo.click()
Now if I debug this, I don't get the error above, and I can see there element has been selected...but upon click nothing happens
This is the expected element, even checked the screenshot in base64 and it looks ok, it's a radio input button...just wondering why click doesn't work??
UPDATE: Based on response from @DebanjanB I used his sugestion and this works but the button does not get clicked
Upon clicking there should a new drop down be enabled
This is the radio button:
When clicked this drop-down is enabled:
The relevant code about this element
<span id="filtroAsignado" class="W30">
<select name="nuumaAsignado" class="W84">
<option value="">[Todo mi equipo]</option></select>
</span>
So now I wonder why this does not get clicked?