Repository navigation
PW_CHROMIUM_ATTACH_TO_OTHER: is a hidden target a supported way to get a page? #232
Unanswered
stickerdaniel
asked this question in
Q&A
Replies: 2 comments 3 replies
This comment was marked as low quality.
This comment was marked as low quality.
|
@rakeshutekar Please do not use LLM in any direct communication under any of my Projects. If you do so again i will block/ban you from communicating under any Repo in this Orga. @stickerdaniel Im giving you the benefit of the doubt here, as im not sure if/how much of your post is AI-generated. If it is, please refrain from doing so. On your two questions:
|
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
launch_persistent_context()always opens a window, which is awkward for a long-running background process.--no-startup-windowis not a way around it:loadDefaultContextAsIs()waits for aPageevent, and that switch is precisely what prevents one, so the launch hangs until it times out.The alternative that looks viable is to create the page as a hidden target instead:
Chromium reports that target as
type: "other", so it is only exposed as aPagewhenPW_CHROMIUM_ATTACH_TO_OTHERis set; without it the session is detached (coreBundle.js:38445-38446). In persistent mode_defaultContextexists and is used as the fallback, so the attach should land.Two questions before I depend on it:
driver_patches/crBrowserPatch.tsrewritesCRBrowser. Does anything in it touch target attachment, or is that path stock Playwright?Happy to send a repro if it helps.
All reactions