screenshot on failure capturing passing specs as well
See original GitHub issueHello, we are trying to capture screenshots automatically on failure. This works but seems to also capture screenshots from other (passing) specs which are running in parallel. We have 10 workers but seem to consistently get 6 other screenshots (of non-failing specs) along with the intended screenshot of our (temporarily purposefully) failing spec.
Is this a known issue or are we perhaps doing something wrong? The only addition we made to light this up is the line in the config per to the docs:
screenshot: 'only-on-failure'
Thanks!
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:7 (3 by maintainers)
Top Results From Across the Web
How to Capture Screenshot in Selenium for Failed Test Cases
We will create a Utility class that will have one method which will capture the screenshot. Utility.
Read more >How to Capture Screenshot for Failed Tests in TestNG
Get all my courses for USD 5.99/Month - https://bit.ly/all-courses-subscription FREE Training's at https://training.rcvacademy.com ...
Read more >Capture screenshots of flaky end-to-end tests - CircleCI
If a test fails, take a screenshot of the webpage and store it somewhere - that way, you can look into the failure...
Read more >TestNG Selenium Capture Screenshot on failure
Hi, I am very new to Selenium. Could you please help me with the steps to Capture Screenshot on failure using TestNG Framework...
Read more >Attach Screenshots on Test Failure — WebdriverIO
Wouldn't it be nice to know the exact state of the application you are testing whenever a test failed to help debug your...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hi @CThompsonLifeTime It is because you create the page manually via
page = await browser.newPage();
instead of using the page fixture. The solution is to close the page manually by callingawait page.close()
after each test.This solved our problem - thank you very much.