| || |
Problem with GetItemText
I was asked to find out how long it takes for a list to get filled in on my test app. So I set up a loop where I use GetItemText(1) as long as the GetItemText returns #1 I know the list was not updated. This works just fine most of the time, the problem that I have is that if the list contains nothing the GetItemText seams to hang. Is there an agent option that I can set so that the test will time out? Or atleast have the GetItemText method time out?
Re: Problem with GetItemText
To prevent such hanging you may use the following line
To identify whether list is empty you'd better verify that iItemCount property returns 0. It is safe way to perform such verification