I am utilizing Powershell to operate .NET Selenium with a FirefoxDriver in order to automate certain tasks. One of these tasks involves file uploads, and the website I am working with appears to have been built using AngularJS.
After some experimentation, I managed to automate file uploads using a standard input element by sending the file path through SendKeys.
However, I am stuck when it comes to this specific scenario. The HTML code for the file drop area, which includes an optional manual file selector, is as 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 && 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>
This explanation might be oversimplified. There are likely additional components to consider within the AngularJS framework. Nevertheless, I am hopeful that this information will help guide me towards a solution. If more details are needed, please let me know and I can provide them.
While researching, I came across Protractor as a popular choice for AngularJS testing. However, implementing Protractor would significantly change my current setup (including incorporating a NodeJS server), whereas all I require at the moment is assistance with the file upload functionality.
Thank you!
Sandro