Using playwright UI mode with Cucumber
Asked Answered
I

1

8

Recently Playwright implemented new UI mode which could be runned with npx playwright test --ui I'm using cucumber-js with Playwright. Is any way to run cucumber tests with playwright in that --ui mode?

I tried to run cucumber-js with that flag, but as expected this wasn't helpful.

Inductive answered 17/4, 2023 at 13:51 Comment(4)
How do you currently run your cucumber-js tests with playwright? Please share the code.Intuitive
And what do you mean by "this was n't helpful"? Did you get any error?Intuitive
Hi, Vishal! This is my pet-project github.com/mi4i0/playwright-cucumber-pet/tree/master/e2e I'm trying to start it with cucumber script from package.json. I get expected error that cucumber-js don't have --ui flagInductive
This is not possible to use UI mode with Cucumber-js runner b/c --ui flag is a part of Playwright runner. If you need to run BDD tests in UI mode, you can check out github.com/vitalets/playwright-bdd integration.Vermiculite
Z
0

You can use this config in test script:

browser = await chromium.launch({ headless: false });

Zoroaster answered 5/10, 2023 at 8:8 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.