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

Screenshots and page source saved erroneously with save_screenshot_on_failure and save_page_source_on_failure even on success #548

Open
PyGenych opened this issue Jul 18, 2024 · 0 comments
Labels

Comments

@PyGenych
Copy link

Preconditions:

  1. Version: 2.0.0rc9
  2. browser.config.save_screenshot_on_failure is True
  3. browser.config.save_page_source_on_failure is True

Steps:

  1. Ensure that browser.wait_until() function returns False
    Example:
from selene import browser
browser.wait_until(False)

But the program completed successfully without unhandled exceptions.

  1. Check selene folder in your system (for example on Ubuntu its /home/<username>/.selene/screenshots by default)

Actual result:
Added a screenshots folder to the selene folder with two files: png-screenshot and html-page-source.

Expected result:
The screenshots folder should not be added to the selene folder since all exceptions have been handled.

Additional info:
Screenshot and page source should only be taken if the program terminated with an unhandled exception.

@yashaka yashaka added the bug label Jul 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants