2

Is there a way to automate the clicking (opening,clicking certain button of the application and finally closing it) with some script or an android application.

2 Answers 2

9

Depends on what you're trying to do. For UI testing of your app you can use the build-in support, have a look at http://developer.android.com/training/activity-testing/activity-ui-testing.html or perhaps look into the UI automation tool.

If what you want to do is emulate user events on any given app, you could use adb to send key or touch events, but it would be a on a very low level

For example:

adb shell input keyevent 3

Would emulate pressing the home key.

You could also do

adb shell input tap 50 50 

to emulate a touch event at the given coordinate.

Sign up to request clarification or add additional context in comments.

Comments

1

You can use uiautomator (requires API 16+).

Robotium (which also uses the Android testing framework) is another great testing framework for UI. Same goes for Espresso. You can then write JUnit 3 tests for your app.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.