I am using Cucumber integration with Playwright (e.g. https://github.com/e2e-boilerplate/playwright-commonjs-cucumber-expect/blob/master/features/support/steps.js). Because of this I don't have a playwright config file and I launch the browser manually
e.g.
const browser = await playwright.chromium.launch({ headless: true, u });
const context = await browser.newContext();
const page = await sharedContext.newPage();
However, I would like to configure Playwright to take a screenshot if a test fails (as described here: https://playwright.dev/docs/test-configuration#automatic-screenshots).
Is this possible, or does use of Cucumber to run the tests mean this functionality becomes unavailable?