Is there any way to programmatically interact with android UI elements to fill out forms in an app?

Viewed 27

In a similar way that I could use javascript in a browser's developer console to write text in input fields, check radio buttons, and click buttons in a webpage, I would like to interact with an app to automatically fill out some forms (not a web form in a mobile browser, but a native app with text fields, radio buttons, and other buttons). Thanks in advance

1 Answers

There are some things you can do:

view.performClick();

view.performLongClick();

For some views:

view.setText("Hello world!");

For CompoundButtons like RadioButton:

view.setChecked(true);
Related