I'm creating a chrome extension that injects a javascript script into a specific webpage. The script goes through the page, searching for data, collecting data, clicking buttons.
I have run into an issue where there is an input box before a continue button. The button is unclickable until the input box's value meets a certain condition. I can enter that value into the input box using:
document.querySelector("inputBox").value = "requiredValueToContinue"
However the continue button will remain disabled, even though the input box contains the correct value. I know it's the correct value because if I then manually click into the input box and hit the delete key at the end of the value(so nothing is actually deleted), the continue button is no longer disabled.
So it seems like when i change the input value via script the dom doesnt recognize the input value has changed. It doesnt check to see if the value meets the requirement to continue.
I have also tried to do the following after i change the input box's value in attempt to get the page to realise its value has changed: inputBox.focus() inputBox.click()
Does anyone know how i can get the input box to recognize that the value has changed and trigger what seems to be an onchange function listening to it?