0

Can someone post an example of how to upload a file in protractor using a button? Not sure if setFileDetector is needed in here or not.

I am using Protractor, JS, selenium standalone server, and have a button to select a file, i.e.

Button: Select File

button id="upload-button" class="button" ng-file-select ng-file-change="uploadCtrl.upload($files)" ng-accept="'*.jpg, *.gif'"

Can someone explain how to upload the file in protractor? Thanks!!

alecxe
  • 462,703
  • 120
  • 1,088
  • 1,195
reutsey
  • 1,743
  • 1
  • 17
  • 36
  • 2
    Explore the HTML source code - there should be an `input` field with `type="file"`. It can be hidden. Provide the HTML code of the input if you'll find it. Thanks. – alecxe Mar 25 '15 at 20:20
  • As @alecxe said look for the `type="file"` `input` field in the HTML code. It should be one level up of the button ideally. – Rahul Vig Mar 27 '15 at 09:33

0 Answers0