We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I’d like to request the ability to add condtion for step.skip() like for test.skip()
For example some test steps are needed for desktop views and no needed for mobile views or vice versa.
Make tests more flexible
The text was updated successfully, but these errors were encountered:
interested, maybe currently you can handle using helper function like this
helper
async function maybeSkip(condition: boolean, stepFunction: () => Promise<void>) { if (!condition) { await stepFunction(); } else { console.log('Step skipped due to condition.'); } }
test
test('using helper function to skip step', async ({ page }) => { await page.goto('https://example.com'); const shouldSkipStep = true; // skip test await maybeSkip(shouldSkipStep, async () => { await page.click('#some-button'); }); await page.fill('#input-field', 'Hello Playwright'); });
Sorry, something went wrong.
yury-s
No branches or pull requests
🚀 Feature Request
I’d like to request the ability to add condtion for step.skip() like for test.skip()
Example
For example some test steps are needed for desktop views and no needed for mobile views or vice versa.
Motivation
Make tests more flexible
The text was updated successfully, but these errors were encountered: