前进

--- xingyunpi


phantomjs + robot framework 在docker里面跑的时候,总是出错,网上这样的解决方案并不是很多,写下来记录一下,供他人参考.

错误提示:

[ WARN ] Keyword 'Capture Page Screenshot' could not be run on failure: WebDriverException: Message: Variable Resource Not Found - {"headers":{"Accept":"application/json","Accept-Encoding":"identity","Connection":"close","Content-Type":"application/json;charset=UTF-8","Host":"127.0.0.1:33799","User-Agent":"Python http auth"},"httpVersion":"1.1","method":"GET","url":"/session/b092d610-77f7-11e7-bdc8-e7ce409f6da2/screenshot","urlParsed":{"anchor":"","query":"","file":"screenshot","directory":"/session/b092d610-77f7-11e7-bdc8-e7ce409f6da2/","path":"/session/b092d610-77f7-11e7-bdc8-e7ce409f6da2/screenshot","relative":"/session/b092d610-77f7-11e7-bdc8-e7ce409f6da2/screenshot","port":"","host":"","password":"","user":"","userInfo":"","authority":"","protocol":"","source":"/session/b092d610-77f7-11e7-bdc8-e7ce409f6da2/screenshot","queryKey":{},"chunks":["session","b092d610-77f7-11e7-bdc8-e7ce409f6da2","screenshot"]}}


phone-invalid | FAIL |
OSError: [Errno 9] Bad file descriptor

原因:

robot的脚本里写了: close all browsers

解决:

Remove “close all browsers” in the test case scripts when using phantomjs as browser.


Logo

权威|前沿|技术|干货|国内首个API全生命周期开发者社区

更多推荐