Skip to content

Finding nested elements in cdp mode + iframe #3848

Answered by mdmintz
alerodm asked this question in Q&A
Discussion options

You must be logged in to vote

I would check out #3528 (comment).
If element.query_selector(selector) isn't working and sb.get_nested_element(parent_selector, selector) isn't working, then you may have to call sb.reconnect() in order to use the regular Selenium iframe methods such as switch_to_frame(frame).

For some cases where you need to retain stealth, there are workarounds, specifically for interacting with elements inside nested iframes. PyAutoGUI can be used for that. Example: #3533 (comment).

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@alerodm
Comment options

@mdmintz
Comment options

Answer selected by mdmintz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants