我正在尝试上传图像,当我单击“上传图像”按钮时,它会显示所有图像,但我无法选择图像。
这是HTML代码,请为我提出解决方案。
<div class="uploadimg clearfix" ng-show="member.data.imageType != 'avatar'">
<div ng-model="member.data.image" name="image" ngf-select="uploadFiles($file, $invalidFiles,'user')" class="button ng-pristine ng-untouched ng-valid ng-empty">
<img ng-src="/public/images/uploadimg-img.jpg" src="/public/images/uploadimg-img.jpg">
</div>
<div class="uploadingsecpop ng-hide" ng-show="member.data.image && member.data.imageType == 'image'">
<img class="thumb" src="/public/images/" alt="">
</div>
</div>
答案 0 :(得分:0)
var path = require('path');
var fileToUpload = "F://images/f2.jpg";
var absolutePath = path.resolve(__dirname, fileToUpload);
element(&%#LOCATOR&^#%).sendKeys(absolutePath);