selene icon indicating copy to clipboard operation
selene copied to clipboard

Set the name of the screenshots when the test crashes

Open timosmon opened this issue 5 years ago • 2 comments

I would like to see the possibility in the configuration to change the names of screenshots generated during test crashes. Thank you!

timosmon avatar Jun 03 '20 14:06 timosmon

Hm... this might be not a simple enough implementation... It might be hard to provide one way to achieve that, the way that will have an API and style that will satisfy everybody...

What is your context? Can you describe a bit more why do you need that?

It might be simpler to provide your own implementation of custom screenshots we custom failure hooks, that are supported by Selene. I will provide examples a bit later in this thread...

yashaka avatar Jun 03 '20 18:06 yashaka

Thanks for the quick response. Selene currently generates screenshots with the name "screen_1591194276490.jpg", but Unix time is not a convenient option for humans. In this regard, I would like to be able to configure the names of screenshots, for example, in the format {testname}-{dd-MM-yyyy}-{HH-mm-ss}.jpg or something like that.

I will be glad to see examples. Thank you for your work!

timosmon avatar Jun 04 '20 11:06 timosmon