selene
selene copied to clipboard
should not we put screenshots inside specific `<config.reports_folder>/screenshots` folder?
@SergeyPirogov,
def take_screenshot(path=None, filename=None):
if not path:
path = selene.config.reports_folder
if not filename:
filename = "screen_{id}".format(id=next(selene.config.counter))
screenshot_path = os.path.join(path,
"{}.png".format(filename))
should we change it to something like:
def take_screenshot(path=None, filename=None):
if not path:
path = selene.config.reports_folder
if not filename:
filename = "screen_{id}".format(id=next(selene.config.counter))
screenshot_path = os.path.join(path,
"screenshots/{}.png".format(filename))
?
Well make sense, in case we want to save smth in reports folder. I don't know what we can save, but yes I agree with this
looked at the code. We are collecting screenshots in folder .selene/screenshots/324234234/screen_23e23423.png
So that we don't need to change the code
@SergeyPirogov yeah, now it like this... but only because the "screenshots" part was hardcoded in selene.config:
_default_folder = os.path.join(os.path.expanduser('~'), '.selene', 'screenshots', str(next(counter)))
reports_folder = env(SELENE_REPORTS_FOLDER, _default_folder)
but we now should delete it... because now reports_folder means "any reporting stuff" not only screenshots...