'How do I enter data into the input box of a form using JavaScript in TradingView?

how do I put a value in a form using java script. It is a form on the TradinView platform. The input box is identified by a class. For some reason document.getElementsByClassName() does not work.

function myFunction() {
document.getElementsByClassName("input-uGWFLwEy with-end-slot-uGWFLwEy")[0].value = "3";}

The value is displayed in the input box, but the form does not save this input. Any ideas?

link to the page with the form:

https://www.tradingview.com/chart/I3X8Rqto/

enter image description here



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source