I have a Swagger authorization window and I would like to automatically fill the api key field:
I do it through js, and it works:
var element = document.querySelector('form div .wrapper section input');
element.value = "Bearer " + data.access_token;
But if I then click on the Authorize (form submit) button, nothing happens. The button works only if I enter some value in input manually, and it works even if I erase it then and leave input empty. I tried to trigger some events (change, keypress, keydown, etc) on input or on the form, but it didn't bring any results. How can I work around it?