Android provide single and multiple touch support. If you want to response to the touch event, you must create an instance of android.view.View.OnTouchListener and override it’s onTouch(View view, MotionEvent motionEvent) method. Then register the listener to the view object use the view’s setOnTouchListener method.
Android use event queue to manage events generated by system or device user. When an event occurred ( for example user click a button will trigger on click event ), the event will be placed in the event queue. All the events in the queue comply with FIFO ( first in first out) principle.
When you execute selenium automation testing scripts, there are a lot of times that you want to do something when an event happened. For example: Take screenshot when an exception occurred. Monitor and track the web element status after some action take place. Log data before or after an action. Log the navigation url to check if …