test("Open chrome with existing session", async ({}) => {
const userDataDir =
"/Users/SinhAb/Library/Application Support/Google/Chrome/";
const browserContext = await chromium.launchPersistentContext(userDataDir, {
channel: "chrome",
});
let page = browserContext.pages().at(0);
if (!page) page = await browserContext.newPage();
await page.goto("amazon.co.uk/");
await page.waitForTimeout(5000);
});
This is the code I have used, for this, new window in existing browser panel is getting opened but the URL is blank, it’s showing “about:blank”.