Hi @prem.nadarajah,
Welcome to our community. Thank you for letting us know your issue.
I found a great discussion on dynamic object testing and how to handle it: Dynamic Objects How to Make - #32 by josh.meeks. Please take a look and let me know if it does not help. Thank you