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

[Docs] Wrong description for 'path' parameter of the 'takeScreenshot' action #1515

Closed
miherlosev opened this issue Jun 2, 2017 · 4 comments · Fixed by #1589
Closed

[Docs] Wrong description for 'path' parameter of the 'takeScreenshot' action #1515

miherlosev opened this issue Jun 2, 2017 · 4 comments · Fixed by #1589
Assignees
Labels
AREA: docs An issue related to the product documentation. STATE: Auto-locked An issue has been automatically locked by the Lock bot. TYPE: bug The described behavior is considered as wrong (bug).
Milestone

Comments

@miherlosev
Copy link
Collaborator

From docs:
path - A relative path to the folder where screenshots should be saved.

It is wrong.
path is a screenshot path. Screenshots are saved in .png format. If screenshot name doesn't contain .png then it will be added to the result name.
Examples:

Screenshots folder is 'screenshots'

takeScreenshot('test') - > screenshots/test.png
takeScreenshot('/test') -> screenshots/test.png
takeScreenshot('/test.png')  -> screenshots/test.png
  • testcafe version: 0.16.0@alpha4
@miherlosev miherlosev added the AREA: docs An issue related to the product documentation. label Jun 2, 2017
@miherlosev miherlosev added this to the Planned milestone Jun 2, 2017
@AlexanderMoskovkin AlexanderMoskovkin added the TYPE: bug The described behavior is considered as wrong (bug). label Jun 9, 2017
@AlexanderMoskovkin AlexanderMoskovkin modified the milestones: Sprint #8, Planned Jun 9, 2017
@VasilyStrelyaev
Copy link
Collaborator

if path includes the filename - what is the default filename if path is not specified?

@miherlosev
Copy link
Collaborator Author

If path does not specified the full path will be calculated as:
screenshots folder + {current-date}\{testName-testIndex}\{userAgent}\screenshotIndex.png

Example:
screenshots folder: c:\\temp

test('test', asynct t => {
    await t.takeScreenshot();
});

Screenshot will be saved in c:\temp\2017-07-05_02-34-34\test-2\Chrome_59.0.3071_Windows_8.1_0.0.0\.1.png file.

@AndreyBelym correct me if I don't right

@AndreyBelym
Copy link
Contributor

Yes, that's mostly right, there will be no {testName} in path, and it differs slightly when quarantine mode is enabled. So if quarantine mode is not enabled:

{screenshotsFolder}\{currentDate}\test-{testIndex}\{userAgent}\{screenshotIndex}.png

and if quarantine is enabled, it is:

{screenshotsFolder}\{currentDate}\test-{testIndex}\run-{quarantineAttempt}\{userAgent}\{screenshotIndex}.png

@lock
Copy link

lock bot commented Mar 28, 2019

This thread has been automatically locked since it is closed and there has not been any recent activity. Please open a new issue for related bugs or feature requests. We recommend you ask TestCafe API, usage and configuration inquiries on StackOverflow.

@lock lock bot added the STATE: Auto-locked An issue has been automatically locked by the Lock bot. label Mar 28, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Mar 28, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
AREA: docs An issue related to the product documentation. STATE: Auto-locked An issue has been automatically locked by the Lock bot. TYPE: bug The described behavior is considered as wrong (bug).
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants