That's my first question here on Stack Overflow, I tried to do my best to explain the problem but please be patient and excuse me for any errors
I'm trying to automate in an Android APP the filling of the form in the page reachable by the following URL: https://www.dgc.gov.it/spa/public/home
I managed to run JavaScript code in the WebView, but the problem is that even outside of a WebView, that is with the console of a traditional browser, I cannot really modify the values of the fields
That's because if I execute something like this on Firefox / Chrome console:
window.onload= (function(){
var selectElementTS = document.getElementById('ts');
if(selectElementTS) {
selectElementTS.value = "58560193";
}
})();
The value in the 'ts' field gets changed, but when I click on another field and type even a single character, the value in the 'ts' field gets reset to the value it had before it was changed with JavaScript. The same behavior happens when I modify any other field with JS.
I think it may be some sort of protection of the website performed through event handlers, and I thought a possible solution could be to simulate all the events manually typing on the field produces on the website's javascript code, but after searching for a long time here on StackOverflow and on the internet, in general, I could not find a solution that once adapted to my problem could solve it, could you help, please?
Thanks in advance, lopor
maybe try to use selenium-webdriver? its for auto testing in your browser
u can run any browser with any properties add any function(click, input and other)
Visit: https://www.selenium.dev/documentation/webdriver/ and if u need, i can give you example