I'm trying to select an input field inside of an iframe but using nodrivers tab.select('input[name=number]')
function its not working...
In the documentation it says nodriver has "smart lookup" which can find elements inside of iframes.
One of the my attempts was this: One of the my attempts was this:
iframes = await tab.select_all("iframe")
for frame in iframes:
for attr in frame.attributes:
if "test" in attr:
iframe = frame
# Get required tab. Not safe in case when tab not found
iframe_tab: uc.Tab = next(
filter(
lambda x: str(x.target.target_id) == str(iframe.frame_id), driver.targets
)
)
# Fixing websocket url
iframe_tab.websocket_url = iframe_tab.websocket_url.replace("iframe", "page")
however when using iframe_tab.get_content() it doesnt actually appear to have anything of use. is there a working method to access iframe content with nodriver?