How to click a button in js

I tried all the classes and id, there is no click. Help with advice on how to click a button using js commands



document.getElementsByClassName(“blue main”)[0].click();

You cannot directly access Shadow DOM Elements.
Try this:


Thank you. I’ll try tomorrow, I’m not at the computer now

did not help…

1 Like

If you are trying to do it in webview then it may not be possible as input element always require manual user action ( such as button click ). it cannot be done via js

You can try it in chrome dev console. js code works

1 Like

sorry … I wanted to create a file scanner application …

1 Like