Output dir not created when is a nested directory
See original GitHub issueHi,
When setting up the output directory as subdirectory of a non-existing directory, the application is not creating the tree before trying to save the screenshots:
Example:
"output": "./reports/integration/screenshots",
Should create reports
, reports/integration/
, reports/integration/screenshots
if those doesn’t exists.
At the moment the reporter is outputting this:
Uncaught ENOENT: no such file or directory, open [screenshotFile]
Where [screenshotFile] is the path to the screenshot.
Thanks!
Issue Analytics
- State:
- Created 7 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
How can I safely create a nested directory? - Stack Overflow
Try os.path.exists , and consider os.makedirs for the creation. import os if not os.
Read more >Output dir not created when is a nested directory #168 - GitHub
Hi, When setting up the output directory as subdirectory of a non-existing directory, the application is not creating the tree before trying ...
Read more >How can I create a directory if it does not exist using Python?
In Python, use the os.path.exists() method to see if a directory already exists, and then use the os.makedirs() method to create it.
Read more >How to Create Directory If it Does Not Exist using Python?
In this method, we will use isdir() method takes path of demo_folder2 as an argument and returns true if the directory exists and...
Read more >How to Make Nested Directories in Linux Command Line
Learn to make nested directories so that if a directory in the given path doesn't exist, it is created automatically.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hey, Thing is basic reporters for Mocha / Karma or Protractor (screenshot / failures ) creates folders recursively if they don’t exists then write the reports into, so that would be more consistent with the rest of the common tools present in the community. I agree that at least checking if the folders exists is a must to have if you want to keep the current strategy 😃.
Closing this issue. In 1.0.0 there is no problems to create output directories recursive