What are the best practices when clicking/typing elements.
Should each click/type be accompanied with a find element to ensure the element exists?
Or should each click/type be encompassed within a try/catch block to catch the exceptions?
What are the best practices around the same?
Are there any standard UiPath templates that automate basic web/windows interactions which can serve as a reference?
Find Element is not a best practice as the
Click activity itself gonna find the element for you to click.
So basically I will try to list few important points below,
Click activity with the best possible input method like Simulate as first preference
If possible use modern design, where you can verify the click action happened successfully or not else to trigger retry
Choose a proper timeout instead of delay which helps the activity to work in a dynamic way
Wait for ready to be chosen as per the app or element behaviour
The activity you use should be properly named in a meaningful way like the actual action - For example Click Login Button
Hope that helps
Adding few more to the @Nithinkrishna points.
Make sure the selector which in the click activity is stable. If there any dynamic attributes, either remove them by validating in Uiexplorer or use * in teh attribute value.
Make use of uiexplorer if there is a requirement to click on elements by passing some values. Then you need to make the selector dynamic.
*Simulate click is faster and supports background automation, but make sure the element is supporting the simulate click
*Always try to use an anchor before to the click activity. In the modern click activity it will directly ask you to select an anchor, which is more stable.