如何使用量角器自动化文件上传功能?
答案 0 :(得分:0)
我相信你问的是如何将文件上传到你的应用程序,对吗?如果是这样,这段代码就可以了:
var path = require('path');
//the file to upload
var fileToUpload = 'C:\\your file path',
//this is variable that inserts the path to find file to upload
absolutePath = path.resolve(__dirname, fileToUpload);
//inserts the path
$('input[type="file"]').sendKeys(absolutePath);