macaca icon indicating copy to clipboard operation
macaca copied to clipboard

js版本的saveScreenshot方法参数的filePath路径没创建时报错

Open CodeToSurvive1 opened this issue 10 years ago • 1 comments

  • Macaca Version:
  • Macaca Doctor Logs:
  • Operate System:
  • Programming Language:

最近在测试保存附件需要根据时间建立目录保存图片的时候发现报错,no such file or directory 找到帖子https://github.com/alibaba/macaca/issues/170 及 代码https://github.com/macacajs/macaca-wd/blob/master/wd/lib/commands.js#L1117 断点发现 代码https://github.com/macacajs/macaca-wd/blob/master/wd/lib/commands.js#L1143 报错,no such file or directory

于是测试下fs的writeFile确实在路径不存在的时候报错no such file or directory

CodeToSurvive1 avatar Oct 13 '16 07:10 CodeToSurvive1

https://github.com/macacajs/macaca-wd/commit/6228c1367f3cc37235e24ab039b3480d33efe030 已修复。

ziczhu avatar Nov 28 '16 09:11 ziczhu