javascript - Automate file upload in AngularJS via Selenium -



javascript - Automate file upload in AngularJS via Selenium -

i using powershell drive .net selenium , firefoxdriver automate stuff. part of file uploads , website happens written (at to the lowest degree partly) angularjs.

now have figured out how automate file upload normal input element. send file path via sendkeys.

but can't figure out situation. html file drop area optional manual file selector follows:

<div class="overflowhidden video-drop-zone file-drop-zone zone appversionicon rounded" ng-file-drop="onfileselect($files);" ng-file-drop-available="dropsupported=true"> <div class="simpledropzonefileselect"> <span class="selectfiletext"> <span class="ng-binding ng-hide" ng-show="droplabel !== undefined &amp;&amp; droplabel !== ''"><br></span> <a class="ng-binding" href="" ng-show="true">select file</a> <input class="" ng-show="true" ng-file-select="onfileselect($files)" type="file"> </span> </div> </div>

i hope haven't simplified much. , there certainly more whole angularjs setup that. maybe plenty give me pointers next or how approach this. if not, allow me know , i'll add together more info.

i have found protractor seems way go when doing angularjs testing, alter setup considerably (with nodejs server etc.) , need right file upload.

thanks!

sandro

not sure how entire set looks like. file upload much easier in selenium.

driver.findelement(by.cssselector("input[type='files']")).sendkeys("filepath")

should it

javascript angularjs selenium selenium-webdriver

Comments

Popular posts from this blog

javascript - I need to update the text of a paragraph by inline edit -

javascript - THREE.js reposition vertices for RingGeometry -

assembly - What is the addressing mode for ld, add, and rjmp instructions? -