0

I am trying to upload image, when i click on upload image button then it displays all images but i am failed to select image.

This is the HTML code, please suggest me a solution.

<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 &amp;&amp; member.data.imageType == 'image'">
      <img class="thumb" src="/public/images/" alt="">
   </div>
</div>

enter image description here

Manish Balodia
  • 1,863
  • 2
  • 23
  • 37
  • Refer [here](https://stackoverflow.com/questions/21305298/how-to-upload-file-in-angularjs-e2e-protractor-testing) for the similar issue and solutions. – Madhan Raj Jul 03 '18 at 13:35

1 Answers1

0
var path = require('path');
var fileToUpload = "F://images/f2.jpg";
var absolutePath = path.resolve(__dirname, fileToUpload);
element(&%#LOCATOR&^#%).sendKeys(absolutePath);
Madhan Raj
  • 1,404
  • 1
  • 7
  • 13