4

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?

MeSo2
  • 450
  • 1
  • 7
  • 18

1 Answers1

8

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.

AndreVitorio
  • 622
  • 1
  • 7
  • 18
  • Save first! It will kill your extension window when you change this setting. – Brad Turek Feb 02 '22 at 17:01
  • @AndreVitorio This did not work for me. I do get a warning _WARN  Unsupported engine_: _wanted_: _{"node":"16.x"} (current: {"node":"v18.16.0","pnpm":"8.5.1"})_. Could this be the problem? – MeSo2 May 24 '23 at 23:45