-
Notifications
You must be signed in to change notification settings - Fork 122
Description
When loading a page which has an iframe with a different origin, page.frames() either doesn't return the frames at all or the url Option is None (idk why it behaved differently sometimes).
Either way, the only way to access a frame's content is by using GetTargetParams which successfully returns the targets of all frames. Unfortunately - since frames are not "pages", I can't use browser.get_page().
The only way I see to interact with a frame is using AttachToTargetParams which returns a SessionId. However, I don't see a way to use the SessionId other than creating command from raw json.
Is there a nice way to achieve this already?
If not - I feel like a utility method which creates a Session or Target or Frame object which shares some functionality with the Page struct would be a nice addition. Any thoughts on that?
An even simpler alternative would be something like a browser.execute_with_session() function where a SessionId can be passed.