|
+ const crSession = (this._page._delegate._sessions.get(this._id) || this._page._delegate._mainFrameSession)._client |
@nwebson Hi, I found that this line has some bugs — sometimes it clears the main frame's context when a child frame attaches.
This happens because, when the specific frame's session is not found, the code falls back to using the main frame's session.
Playwright is supposed to create a child frame session when the Target.AttachedToTarget event is triggered, but sometimes the event does not trigger, and I’m not sure why. This behavior is unexpected.
