screenshot() of SelenideElement creates the file in "working dir" and without extension #290

Closed
vinogradoff opened this Issue Feb 12, 2016 · 4 comments

Projects

None yet

4 participants

@vinogradoff
Collaborator

should probably use .png and reportsDir instead...

@vinogradoff vinogradoff changed the title from screenshot() of Selenide element create the file in "working dir" and without extension to screenshot() of SelenideElement creates the file in "working dir" and without extension Feb 12, 2016
@pavelpp
pavelpp commented Apr 19, 2016

I can confirm that this is the case.

@pavelpp
pavelpp commented Apr 19, 2016 edited

It is using this method, which does not seem to be correct

protected String generateScreenshotFileName() {
    return currentContext + timestamp() + "." + screenshotCounter.getAndIncrement();
  }

It has dot in the wrong place and forgets to add "png". Moving file into a folder with corresponding test name would also make sense, I suppose.

@asolntsev
Member

Thank you for such a detailed description. It will help to fix the issue.

@asolntsev asolntsev added the lets do it label Aug 4, 2016
@asolntsev asolntsev self-assigned this Aug 4, 2016
@asolntsev asolntsev added this to the 3.8 milestone Aug 4, 2016
@asolntsev asolntsev closed this in 331b15e Aug 4, 2016
@asolntsev asolntsev added a commit that referenced this issue Aug 4, 2016
@asolntsev asolntsev #290 fix unit-test ac2fc8e
@simple-elf
Contributor

Thanks a lot. Faced same issue

@BorisOsipov BorisOsipov added a commit to BorisOsipov/selenide that referenced this issue Nov 23, 2016
@asolntsev @BorisOsipov asolntsev + BorisOsipov #290 fix unit-test 2a45e2c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment