Datepicker for every android version

Hi guys,

I am writing my script using Ruby. I am able to run it successfully in marshmallow. I also inspect the elements with the uiAutomator using the marshmallow device. I run my script on that device and everything went smoothly but when I tried to run my script on different android OS my script failed because of the datepicker is different from the datepicker on the marshmallow.

How can I make my script flexible on the datepickers? or what is the better approach for this?


@Aurbie i guess best way is first find out what view you have now (just check that some specific element is visible) and choose needed way to set it.