Closed
Description
I can't figure out why, but element.query_selector(selector)
seems to only work the first time I call it.
Here is an example on https://www.dezlearn.com/nested-iframes-example/
from seleniumbase import Driver
driver = Driver(uc=True)
driver.uc_activate_cdp_mode("https://www.dezlearn.com/nested-iframes-example/")
driver.sleep(5)
iframe1 = driver.cdp.find_element("iframe#parent_iframe") # this works
print(type(iframe1))
# type(iframe1) is <class 'seleniumbase.undetected.cdp_driver.element.Element'>
iframe2 = iframe1.query_selector("iframe#iframe1") # this works
print(type(iframe2))
# type(iframe2) is <class 'seleniumbase.undetected.cdp_driver.element.Element'>
button = iframe2.query_selector("button#u_5_6") # this doesn't work, but doesn't output any error message either
print(type(button))
# type(button) is <class 'NoneType'>
Can you replicate this? I'm on SeleniumBase version 4.34.15