Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Selenium-ide, File upload not working for react application

Recording the test case using Selenium IDE for react application, but unable to Upload a file from selenium-ide. React-dropzone package is used for file upload.

I tried with command "type" and "send keys" but that didn't work.

selenium-ide: 3.6.0

chrome: 74.0.3729.108

I tried with Firefox but got an error message:

File uploading is only supported in Chrome at this time

Logger:

Command: type
Target: css=input[type=file]
Value: c:\fakepath\test.png
Error: {"code":-32000,"message":"Not allowed"}


Command: send keys
Target: css=input[type=file]
Value: c:\fakepath\test.png
Error: Element is not currently interactable and may not be manipulatedElement is not currently interactable and may not be manipulated

Is Selenium IDE able to upload a file and pass the test case?

like image 585
Bhanwarlal Chaudhary Avatar asked Oct 28 '25 04:10

Bhanwarlal Chaudhary


1 Answers

On Chrome you can go to: Window > More Tools > Extensions > Selenium IDE > Details

Then turn on the 'Allow access to file URLs' option.

I was having the same problem and this worked for me.

like image 62
AndreVitorio Avatar answered Oct 30 '25 12:10

AndreVitorio



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!