Skip to content
New issue

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

Multi sessions screenshotOnFail not working correctly. #4623

Open
Nozeren opened this issue Dec 4, 2024 · 1 comment
Open

Multi sessions screenshotOnFail not working correctly. #4623

Nozeren opened this issue Dec 4, 2024 · 1 comment

Comments

@Nozeren
Copy link

Nozeren commented Dec 4, 2024

What are you trying to achieve?

Few months ago I asked if there's a way to save a screenshotAfterFail of a session + the original browser with Webdriver post .
A pr was created but looks like it doesn't work 100% of the time, I can't get all the screenshots like in the PR description.

I made a version of the test created on the PR to test it out.


Scenario('should save screenshot for sessions @session', async ({ I }) => {
  await I.amOnPage('/');
  await I.saveScreenshot('original.png');
  await I.amOnPage('/browsevideos');
  await I.saveScreenshot('main_session.png');
  session('john', async () => {
    await I.amOnPage('/browsevideos');
    await I.see('Fake text'); // Fails here
  });
});

What do you get instead?

I get all the screenshots except the after fail screenshot of the main browser.
image
but appears as artificat on the output
image

Output with ---verbose

 › john - Screenshot is saving to ./output/[email protected]
 › Screenshot of john session has been saved to ./output/[email protected]
 › <Error: ENOENT: no such file or directory, open './output/[email protected]'>

Details

  • CodeceptJS version: 3.6.7
@Nozeren
Copy link
Author

Nozeren commented Dec 11, 2024

It helps a lot to have the screenshots for debug, when you have scenarios with more than 2 sessions.
does anyone have the same problem? maybe it's only on my side..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant