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(); } }); }); https://stackoverflow.com/questions/66165150/use-another-uri-or-route-for-requests-in-playwright February 12, 2021 at 09:03AM
没有评论:
发表评论