My automation script needs to upload an image to the webpage but I can’t seem to upload the image using the normal send_keys method. I suspect it has something to do with the Angular components but I’m not sure how to access them using Selenium webdriver.
I have tried the following:
Automate file upload using Selenium and ng-file-upload
and How to upload file using python+selenium?
These don’t seem to have the solution I’m looking for.
<button class="md-raised choose-file md-button md-ink-ripple ng-empty ng-valid" type="button" ng-transclude="" ngf-select="" accept="image/*" ng-model="vm.uploader.original" aria-invalid="false">Choose file</button>
I don’t have any errors because I can successfully locate the element but the image is not uploaded/sent.