my android app automatically load a specific form from a web page and at the moment the submit button open a confirm popup. I want to automatically "click ok" in the popup to continue to the next page from the form without the human interaction necessity.
I wanted to try using javascript to force the confirm() function
to return true
, but the function is hidden in the submitForm()
function code.
Asked
Active
Viewed 211 times
0

narcis dpr
- 939
- 2
- 12
- 32

Ismael Woltmann
- 1
- 2
-
The app is programmed in java (android native), but the code uses some javascript injections to manipulate the web form. – Ismael Woltmann Oct 26 '20 at 13:57
-
Does this answer your question? [How to simulate a click by using x,y coordinates in JavaScript?](https://stackoverflow.com/questions/3277369/how-to-simulate-a-click-by-using-x-y-coordinates-in-javascript) – TylerH Oct 26 '20 at 16:02
-
no. This only works if the button that I want to click is an html element from the page. In my case, the popup is calls by the web page, but is a android/browser template (like the `alert()` or `confirm()`). – Ismael Woltmann Oct 26 '20 at 17:48
1 Answers
-1
Silly solution, trigger a click at a specified coordinate:
See https://stackoverflow.com/a/3277417/14406944 for reference.

d.figueiredo
- 14
- 1
-
This solution just work if the element I want to click is an html element from the page. But I want to click in a confim popup (like an alert popup). – Ismael Woltmann Oct 26 '20 at 14:09