In last post, we learnt how to upload a file using selenium webdriver.
I was working on an angular application where I need to upload a profile picture. I was using Protractor framework. Angular code for file upload was as below:
You can notice input tag contains an attribute named “hidden” which was a big problem for uploading.
I tried to create similar html code but could not. If you encounter such web elements, you can use above way. This can be used for all types of web element.
If you have any doubt, feel free to comment below.
If you like my posts, please like, comment, share and subscribe.