Click() on <input type="file" /> not opening file dialog

Viewed 316

i am making a chrome extension, when i click on the input of type file programmatically this warning appears but when i do it in the chrome console it opens the file dialog.

Warning in console which  click from extension

i have tried both of these ways

document.querySelectorAll('.text-xs-center.font-weight-bold.file-upload-center-table')[0].click()

and

document.querySelectorAll('.text-xs-center.font-weight-bold.file-upload-center-table')[0].dispatchEvent(new Event('click', { bubbles: true }));

Both them works in console but when with extension the warning appears

0 Answers
Related