macacajs / NoSmoke

A cross platform UI crawler which scans view trees then generate and execute UI test cases.
https://macacajs.github.io/NoSmoke
MIT License
198 stars 57 forks source link

取ocr结果数组方法不安全导致crash,取screenshoots路径不全(没有拼上root.crawlingDateStamp)导致取img失败crash #85

Closed LeonYin945 closed 4 years ago

LeonYin945 commented 4 years ago

image refresh screen result: {"id":"page_1","bbox":{"x0":"0","y0":"0","x1":"828","y1":"1792"},"lines":[{"line":[]},{"line":[]},...... 取ocr结果数组方法不安全,ocr出来的line有空数组的情况,导致crash

macaca-bot commented 4 years ago

This is the translated issue:


The resulting array taken ocr cause unsafe method crash, taken sc

! [Image] (https://user-images.githubusercontent.com/13748427/70888538-8cffc680-201b-11ea-819f-4b78c5232a3d.png) Take ocr result array unsafe methods lead to crash

LeonYin945 commented 4 years ago

![Uploading image.png…]() (/usr/local/lib/node_modules/nosmoke/lib/server/router.js:83:20) Error: ENOENT: no such file or directory, open 'reports/screenshots/19357f67-12e3-451f-b684-f133d2ea031d_0.png',中间未拼接上root.crawlingDateStamp导致取img crash

SamuelZhaoY commented 4 years ago

感谢回复,会尽快处理

macaca-bot commented 4 years ago

This is the translated issue comment: @SamuelZhaoY


Thanks reply will be processed as soon as possible

SamuelZhaoY commented 4 years ago
Error: ENOENT: no such file or directory, open 'reports/screenshots/19357f67-12e3-451f-b684-f133d2ea031d_0.png',中间未拼接上root.crawlingDateStamp导致取img crash

第二个问题 应该是别的原因,代码中有对crawlingDateStamp 路径中进行拼接. image

macaca-bot commented 4 years ago

This is the translated issue comment: @SamuelZhaoY


` Error: ENOENT: no such file or directory, open 'reports / screenshots / 19357f67-12e3-451f-b684-f133d2ea031d_0.png', the splicing intermediate is not taken img crash cause root.crawlingDateStamp ` The second question should be other reasons, the code has to be spliced ​​crawlingDateStamp path. ! [Image] (https://user-images.githubusercontent.com/8198256/71052882-ade52a80-2187-11ea-8c96-18ef686e08cd.png)