我在硒测试案例中工作过。下面是我的代码
browser.load('/sample/demo.html');
browser.sleep(2000);
element(By.id('upload')).sendKeys("D:\\files\\document.docx");
browser.compareScreen(element(By.tagName('body')), 'image1');
通过添加上面的代码,我可以正确地获取文件。但我面临以下错误
Error: There are some read requests waitng on finished stream
Stack:
Error: There are some read requests waitng on finished stream
at module.exports.ChunkStream._end (node_modules\pngjs-image\node_modules\pngjs\lib\chunkstream.js:100:7)
at module.exports.ChunkStream.end (node_modules\pngjs-image\node_modules\pngjs\lib\chunkstream.js:86:10)
at Inflate.onend (_stream_readable.js:595:10)
at Object.onceWrapper (events.js:313:30)
at emitNone (events.js:111:20)
at Inflate.emit (events.js:208:7)
at endReadableNT (_stream_readable.js:1056:12)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickCallback (internal/process/next_tick.js:180:9)
Message:
Error: Timeout - Async callback was not invoked within timeout specified by jasmine.DEFAULT_TIMEOUT_INTERVAL
我尝试使用npm install pngjs --save
将pngjs版本更新为3.3以上,但仍会出现同样的问题。
任何人都可以建议如何解决此错误。我无法正确获取有关此问题的详细信息。