Reputation: 31
Hi Everyone
I'm new to selenium, please bear with me, and guide me a little bit.
So I want to make an automation process with selenium-ide, with the hope that this automation will make testing in my project easier.
So using selenium-ide and trying to upload a file using dropzone.js, here is the normal flow.
What I want to accomplish is "How can I manipulate click/select the file after file explorer opened, using selenium-ide? or is it possible?"
I have already spent hours trying to find the solution and have had no luck.
I try using the command "type" or "send key", and also on my discovery we could use javascript directly with the command "execute script", but I just don't know how to make it work
What I expect is, I could manipulate the manual proses of the selection file with automation from selenium-ide.
Thank You.
Upvotes: 0
Views: 422
Reputation: 31
I got my own answer guys!
My goals above can be solved using selenium-ide command called "type",
Here is the explanation:
dz-hidden-input
, and since I have many file inputs I use an array at the end of XPath [{$check}]
**The Logic / How it works: **
with this solution, we don't need to trigger file explorer, because the above code will inject the image inside dropzone file input, and since dropzone listens to their file input which is dz-hidden-input
, it will act the same way that we choose the file from file explorer.
I hope this answer will help someone whos bumped into the same problem.
Kudos XD
Upvotes: 0