| so only by trail and error I am able to find unique property combination.please help out to have a block of script to handle this problem effectively in first attempt . |
Unfortunately, I'm not sure how giving you a block of code will help. The unique combination of properties that identify an object depend, primarily, on the application that you're testing and how those objects are designed and used.
Generally speaking, I use idStr with a wildcard on some parts, ObjectType, and innerText. The combination of those three properties is usually enough. So, instead of using tagName and innerText, replace with idStr, ObjectType and innerText.