Below is my code. When the application is served and the tests start it uses the BASE_URL I pass in await page.goto(BASE_URL). I want to use another route for all my requests.
describe("Screenshots - PLAYWRIGHT", () => {
it("Takes screenshots for multiple browsers", async () => {
for (const browserType of ["chromium", "firefox", "webkit"]) {
const browser = await playwright[browserType].launch();
const context = await browser.newContext();
const page = await context.newPage();
await page.goto(BASE_URL);
await page.waitForLoadState("networkidle");
await page.screenshot({ path: `screenshots/example-${browserType}.png` });
await browser.close();
}
});
});