【发布时间】:2019-02-25 01:51:24
【问题描述】:
我想上传一张图片,它在本地工作,但在 jenkins 上失败,代码如下:
const fileToUpload = await '../../files/test-automation-660x330.png';
const absolutePath = await path.resolve(__dirname, fileToUpload);
await this.uploadButton.sendKeys(absolutePath);
我收到此错误消息:
WebDriverError: invalid argument: File not found : /opt/jenkins_root/workspace/project-name-e2e/e2e/files/test-automation-660x330.png
【问题讨论】:
-
你能仔细检查一下路径吗?
files目录是否存在? -
是的,因为它在本地工作
标签: jenkins file-upload protractor