I would like to disable some steps in appearing in Allure Report.
I have tried adding steps inside "try" "catch" but it still triggers an entry into both Playwright default report and allure report.
I don't want the steps inside try try catch to appear in the report.
for (const getLocator of locators) {
const element = getLocator(page);
try {
if (await element.isVisible()) {
console.log(`✅ Valid locator found: ${await element.evaluate(el => el.outerHTML)}`);
return element;
}
} catch (error) {
// Ignoring locator visibility errors to avoid polluting the report
}
}