I am using next js app, from UI i want open browser within my app ,
here is my code written in route.js
export async function POST(request: Request) {
const { webUrl: userSearch } = await request.json();
const headersList = headers();
const origin = headersList.get('origin') || 'http:...
@saas Welcome to the JavaScript chat! Please review the room rules. If you have a question, just post it, and if anyone's free and interested they'll help. If you want to report an abusive user or a problem in this room, visit our meta.
@saas It's not possible to do that since puppeteer needs a custom browser to automate everything (e.g. typing and clicking like an actual person). Regular browsers can't do this. However you could switch to Firefox in puppeteer, if you just need to use another browser other than chrone, or you can load the user data when setting up puppeteer so it matches your regular browser.
Usually the kind of settings that can be set on chrome://settings/cookies can be also set via chrome launch flags (they are listed here), but in case of "Allow all cookies" there seems to be no dedicated flag to do this. Navigating to chrome://settings/cookies and set it with puppeteer is neither...
You could also set executablePath to the path of your chromium binary that runs your regular browser (if you use chrome), but this still isn't exactly the same as your regular browser, the only difference is that it uses the same file to start the browser.