Prashast
Prashast

Reputation: 5675

Programmatically click views in android

Is it possible to programmatically send click events to a view? if so, how?

Upvotes: 22

Views: 13765

Answers (2)

Josef Pfleger
Josef Pfleger

Reputation: 74527

If you want to create automated tests you might want to have a look at Espresso. Otherwise you can use the performClick method.

Upvotes: 33

holgerm
holgerm

Reputation: 949

For use in tests take a look at Robotium.

Upvotes: 0

Related Questions