To run Puppeteer with Chrome in non-headless mode, you can simply pass the 'headless' option as false when launching the browser. Here is an example code snippet to do so:
const puppeteer = require('puppeteer');
(async () => {
const browser = await puppeteer.launch({
headless: false // Set to false to run Chrome in non-headless mode
});
const page = await browser.newPage();
await page.goto('https://www.example.com');
// Perform actions on the page
await browser.close();
})();
By setting the 'headless' option to false when launching the browser, Puppeteer will open a visible instance of Chrome rather than running it in headless mode. You can then interact with the browser just like you would with a normal Chrome window.