If you are working with Appium you would have already noticed that you need to perform some actions repeatedly. It makes sense to abstract out the actions into reusable functions to reduce the amount of code re-written and to avoid silly bugs while re-writting the same code.
Here is how I organised my utility. I will keep adding new utility functions to this script. Hope it’s helpful:
This is how we would use these utility functions for neater/modular/better code: