i have question about resource ids in uiautomator :
btn="id:/image_button_cancel"
why sometimes we add ".*" what is the meaning of that ?
btn="id:/image_button_cancel.*"
It is a regular expression. The dot means any character and the asterisk means zero or more repetitions.
So using btn="id:/image_button_cancel.*" will match any resource id that starts with "id:/image_button_cancel".
id:/image_button_cancel
id:/image_button_cancel_action
id:/cancel
id:/image_button
Search about regex to understand it better.