You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please allow playwright codegen to launch the browser in normal mode instead of InPrivate/Incognito mode. Some websites cannot login in this mode. Especially sites that are using Azure AD, they require an active user profile which InPrivate/Incognito mode can't offer.
Example
No response
Motivation
To make the playwright codegen available in more scenarios.
const{ chromium }=require('@playwright/test');(async()=>{// put there the profile path from chrome://version (without the /Default at the end).constcontext=awaitchromium.launchPersistentContext('your-profile',{headless: false,args: ['--disable-features=DevToolsDebuggingRestrictions']});constpage=context.pages()[0];awaitpage.pause();awaitcontext.close()})();
[Feature]: Please allow playwright codegen to launch the browser in normal mode instead of InPrivate/Incognito mode · Issue #35617 · microsoft/playwright
Activity
agg23 commentedon Apr 28, 2025
Duplicate #34797
mxschmitt commentedon Apr 28, 2025
@johnnyqian would something like this work for you? https://dev.to/mxschmitt/running-playwright-codegen-with-existing-chromium-profiles-5g7k
johnnyqian commentedon May 6, 2025
I prefer not using code snippet. What I expected is as follows:
mxschmitt commentedon May 6, 2025
@johnnyqian are you interested to run codegen in "a persistent user context" or "your default user context aka. your Chrome/Edge profile"?
johnnyqian commentedon May 6, 2025
I prefer the default user context which has my signed-in Chrome/Edge profile. Is this possible?
mxschmitt commentedon May 6, 2025
Chrome unfortunately does not allow this anymore starting from Chrome 136: https://developer.chrome.com/blog/remote-debugging-port
There is still an escape hatch via:
could you try if that works for you?