selene icon indicating copy to clipboard operation
selene copied to clipboard

should not we put screenshots inside specific `<config.reports_folder>/screenshots` folder?

Open yashaka opened this issue 8 years ago • 3 comments

@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))

?

yashaka avatar Apr 06 '17 14:04 yashaka

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

SergeyPirogov avatar Apr 07 '17 07:04 SergeyPirogov

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 avatar Apr 08 '17 08:04 SergeyPirogov

@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...

yashaka avatar May 15 '17 22:05 yashaka