Hi Pankaj,
No problem, I'm actually quite glad you were able to resolve the original issue yourself.
As for dealing with this second problem, from your description of the varied behaviors between executions, this null reference error sounds to me like a timing issue. On the other hand, your comment that you've tried adding
'sufficient WAITFOR' says otherwise and has left me uncertain.
In order to provide you with an exact solution, we will need to reproduce the issue locally using a copy of your test against a Fiddler trace of the application it is running against. If you are unfamiliar with how to create a Fiddler trace,
this link will provide you with step-by-step instructions for download and use. Thank you in advanced for helping us advise you.
Best Regards,
Mario
the Telerik team