Forum Discussion
azakharov
10 years agoContributor
Hi Bharadwaj,
In this case I would recomend to find out what part of the grid is not likely to be changed?
Normaly id is the best strategy. If it's dynamically generated, then is there a part of it that is constant? For example someIdString34287123. In this case "someIdString' part is likely to stay constant.
If you can't rely on id then ask yourself what else you can use (contentText property of the child for example).
Even after that, there's no guarantee that you won't need to update your locators from time to time, so just do your best.
Hope it helps.
In this case I would recomend to find out what part of the grid is not likely to be changed?
Normaly id is the best strategy. If it's dynamically generated, then is there a part of it that is constant? For example someIdString34287123. In this case "someIdString' part is likely to stay constant.
If you can't rely on id then ask yourself what else you can use (contentText property of the child for example).
Even after that, there's no guarantee that you won't need to update your locators from time to time, so just do your best.
Hope it helps.
Related Content
Recent Discussions
- 2 hours agoashly