-
-
Notifications
You must be signed in to change notification settings - Fork 326
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Checklist before reporting
- I have searched for similar issues and didn't find a duplicate.
- I have updated to the latest version of pydoll to verify the issue still exists.
pydoll Version
2.12.0
Python Version
3.13.5
Operating System
Windows
Bug Description
For some reason I am unable to locate an iframe on a page using get_frame().
Steps to Reproduce
- Open page with valid IFrame within it
- Find the IFrame element using tab.find() or another method
- Attempt to get the frame using tab.get_frame() and the element found in step 2
Code Example
try:
iframeElements = await page.find(tag_name='iframe', find_all=True)
for c in iframeElements :
if 'someSpecificURL' in c._attributes['src']:
iframeElement = c
# The frame is being found here (not null)
break
iframe = await page.get_frame(iframeElement)
# continue to do things
except Exception as e:
# Getting 'The target for the iframe was not found' Error
# another approach
try:
iframeElement = await page.find(tag_name='iframe', title='someSpecificTitle')
# The frame is being found here (not null)
iframe = await page.get_frame(iframeElement)
# continue to do things
except Exception as e:
# Getting 'The target for the iframe was not found' ErrorExpected Behavior
The page should find the iframe.
Actual Behavior
The page throws an 'The target for the iframe was not found' error.
Relevant Log Output
Additional Context
No response
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working